Developer Function: Server Script: logs.LogUserError
## Overview
This is the "LogUserError" method of the "[logs Object](/en/manual/server-script-logs)". It displays and outputs the log in the "[Server Script](/en/manual/table-management-server-script)" as log type: UserError.
## Syntax
```
logs.LogUserError(message, method, console, syslogs)
```
## Parameters
|Parameter|Type|Required|Description|
|:----------|:----------|:---:|:---------------------------|
|message|string|Yes|Specifies the error content to be displayed and output. |
|method|string||Optional. Default is an empty string. |
|console|bool||Optional. Default is true. Specify true to display in the browser's developer tool console|
|syslogs|bool||Optional. Default is true. Specify true to output to the system log|
## Return Value
Returns true if the log can be displayed and output, or false if it cannot be displayed or output.
## Display content when displayed on the console
##### Display format
```
(UserError):[Method]Message
```
|Display column|Display content|Remarks|
|:----------|:-------|:-------|
|Message|String set in message||
|Method|String set in method|If method is not specified, square brackets ([]) are not displayed either|
## Output destination column when outputting system log
|Output destination column|Output content|Remarks|
|:----------|:-------|:-------|
|Comments|String set in message||
|Method|String combined with the original string recorded in Method in the format of ":method"||
|SysLogType|60|Fixed to 60 (UserError)|
## Usage example
In the example below, the title of the "Limited table" for site ID 2 is "About upgrading Pleasanter", creates a record and outputs a log if creation fails.
##### JavaScript
```
const siteId = 2;
const item = items.NewIssue();
item.Title = 'About upgrading Pleasanter';
const ret = items.Create(siteId, item);
if (!ret) {
logs.LogUserError(`Failed to create record. Site ID: ${siteId}`);
}
```
## Supported Versions
|Supported versions|Body|
|:--|:--|
|1.4.12.0 or later|Added function|
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/table-management-server-script">Table Management: Server Script</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/server-script-logs">Developer Function: Server Script: logs</a><span>06.26.2025 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />