why not just use print displayed in the console window if you run an application from the command line then the output is directed back to that command/terminal window both of these are fine during developmentbut what if the program is not run from command windowperhaps instead it is started up by the operating system automatically (as is typical of numerous services such as print service or web serverin this case there is no terminal/console window to send the data toinstead the data is just lost as it happens the stdout and stderr output streams can be directed to file (or fileshoweverthis is typically done when the program is launched and may be easily omitted in addition there is only the option of sending all stdout to specific file or all error output to the stderr another issue with using the print(function is that all calls to print will be output when using most loggers it is possible to specify the log level required these different log levels allow different amounts of information to be generated depending upon the scenario for examplein well tested reliable production system we may only want error related or critical information to be logged this will reduce the amount of information we are collecting and reduce any performance impact introduced by logging into the application howeverduring testing phases we may want far more detailed level of logging in other situations we may wish to change the log level being used for running production system without needing to modify the actual code (as this has the potential to introduced errors into the codeinstead we would like to have the facility to externally change the way in which the logging system behavesfor example through configuration file this allows system administrators to modify the amount and the detail of the information being logged it typically also allows the designation of the log information to be changed finallywhen using the print(function developer can use whatever format they likethey can include timestamp on the message or notthey can include the module or function/method name or not they can include parameters of not using logging system usually standardises the information generated along with the log message thus all log messages will have (or not havea timestampor all messages will include (or not includeinformation on the function or method in which they were generated etc online resources for further information on logging see the followingwww owasp org/index php the open web application security project (owasp