Log.warn
warn($stringOrMap) -> self
Description
Appends an WARN
level message to data/logs/app.log
as a line of JSON.
Log.warn('Hello Log') // {"date":"2024-09-18 00:14:37","level":"WARN","url":"/your/page",message":"Hello Log"}}
You can also pass in a Map of data, which will be serialized and merged with the event data.
Log.warn({ userId: 1234, event: 'loggedIn' }) // {"date":"2024-09-18 00:14:37","level":"WARN","url":"/your/page","userId":1234,"event":"loggedIn"}}