Info Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about log level hierarchy hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Log Levels Log4j
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each
Log Level Trace Vs Debug
other. Join them; it only takes a minute: Sign up When to use the different log levels? up vote 142 down vote favorite 108 There are different ways to log messages, in order of fatality: FATAL ERROR WARN INFO
Log4j2 Log Levels
DEBUG TRACE How to decide when to use which? What's a good heuristic to use? logging coding-style share|improve this question edited Apr 22 at 7:48 Tushar Makkar 335521 asked Jan 8 '10 at 22:19 raoulsson 4,01463152 add a comment| 16 Answers 16 active oldest votes up vote 217 down vote accepted I generally subscribe to the following convention: Trace - Only when I would be "tracing" the code and trying to find one part of a function specifically. logging levels java Debug - Information that is diagnostically helpful to people more than just developers (IT, sysadmins, etc.). Info - Generally useful information to log (service start/stop, configuration assumptions, etc). Info I want to always have available but usually don't care about under normal circumstances. This is my out-of-the-box config level. Warn - Anything that can potentially cause application oddities, but for which I am automatically recovering. (Such as switching from a primary to backup server, retrying an operation, missing secondary data, etc.) Error - Any error which is fatal to the operation, but not the service or application (can't open a required file, missing data, etc.). These errors will force user (administrator, or direct user) intervention. These are usually reserved (in my apps) for incorrect connection strings, missing services, etc. Fatal - Any error that is forcing a shutdown of the service or application to prevent data loss (or further data loss). I reserve these only for the most heinous errors and situations where there is guaranteed to have been data corruption or loss. share|improve this answer edited Sep 7 at 17:53 BenHohner 327 answered Jan 8 '10 at 22:26 GrayWizardx 8,82321935 Why cant you merge info and warn!??! Isnt a warning about something actually "info"... –mP. Feb 2 '11 at 12:33 14 @mP You could merge info and warn, I guess generally they are separate because of
Glide and Jelly Related Topics Get the Glide Reference Book Contents 1 Overview 2 Business rule and other general use 3 Client side (NOTE: only for use with client scripting) 4 Text size of error and alert messages 1 Overview There are several ways to send alert messages to customers. 2 Business rule and other general use current.field_name.setError("Hello World"); Will put "Hello World" below the specified field gs.addInfoMessage("Hello World"); Will put "Hello World" on the top of the screen gs.print("Hello World"); Will write to the text log on the file system but not to the sys_log table in the database gs.log("Hello World"); Will write to the database and the log file. Too much of this can adversely affect performance 3 Client side (NOTE: only for use with client scripting) alert("Hello World"); Will pop up a window with "Hello World" and an 'OK' button. confirm("Hello World"); Will pop up a window with "Hello World?" and a 'Ok' and 'Cancel' buttons. g_form.showErrorBox("field_name", "Hello World"); Will put "Hello World" in an error message below the specified field. g_form.hideErrorBox("field_name"); Will hide an error box that is visible under the specified field. It's also possible to add other custom messages to your forms if necessary using client scripting. 4 Text size of error and alert messages The text size of info and error messages at the top of the screen is customizable. Two properties control this. If you configured your forms, you may need to add this property. The css.outputmsg.info.text.font-size property sets the size for info messages. Default is 11pt The css.outputmsg.error.text.font-size property sets the size for error messages. Default is 11pt Retrieved from "http://wiki.servicenow.com/index.php?title=Scripting_Alert,_Info,_and_Error_Messages&oldid=241575" Category: General ScriptingContents > Script > General Scripting Was this article helpful?Yes, I found what I neededNo, I need more assistance Views Page Personal tools Log in / create account Categories Get Started Use Administer Script Build Deliver Integrate Release Notes Customer Support Books Video Tutorials Se