Developer Function: Server Script: logs.LogWarning
## Overview
The "LogWarning" method of the "[logs Object](/en/manual/server-script-logs)" is used to display and output logs with the type Warning in "[Server Script](/en/manual/table-management-server-script)".
## Syntax
```
logs.LogWarning(message, method, console, syslogs)
```
## Parameters
|Parameters|Type|Required|Description|
|:----------|:----------|:---:|:---------------------------|
|message|string|Yes|Specifies the warning message to display or output.|
|method|string||Optional. Default value is an empty string.|
|console|bool||Optional. Default value is true. Set to true to display the warning in the browser's developer tools console.|
|syslogs|bool||Optional. Default value is true. Set to true to output the warning to the system log.|
## Return Value
Returns true if the log was successfully displayed or output, and false otherwise.
## Console Display Format
##### Display Format
```
(Warning):[Method]Message
```
|Display Column|Display Content|Notes|
|:----------|:-------|:-------|
|Message|The string set in the message||
|Method|The string set in the method|If method is not specified, brackets([])will not be displayed.|
## System Log Output Fields
|Output Column|Output Content|Notes|
|:----------|:-------|:-------|
|Comments|The string set in the message||
|Method|The original Method combined with the method value in the format 「:method」||
|SysLogType|50|Fixed at 50(Warning)|
## Usage Example
In the example below, a record with the title "About Pleasanter Version Upgrade" is created in the "temporary table" of Site ID 2. If the creation fails, a warning log is output.
##### JavaScript
```
const siteId = 2;
const item = items.NewIssue();
item.Title = 'About Pleasanter Version Upgrade';
const ret = items.Create(siteId, item);
if (!ret) {
logs.LogWarning(`Failed to create the 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="" />