etc/zig.ini.php
files [log]
directive. Configuring Logger ------------------- Z_LOG_LEVEL => Logging Level 0 -> Loging is Disabled 1 -> Log Only Errors 2 -> Log Both Debug and Error -->> There is No option for Debug only Logs cause you must see the error Logs Z_LOG_MEDIA => Where to Log file -> Log to file. tty -> TTY Level Logging (Only on *nix system) socket -> Socket Level Logging Z_LOG_DATE => date pattern in Log.file Name (if media is file) Z_LOG_STAMP_TIME => Time Stamp pattrn default is "H:i:s" Z_LOG_STAMP_DATE => Date Stamp default is "M d Y D" Z_LOG_TTY => tty Name e.g. /dev/pts/2 (The Name might vary System To System) put the tty Name here when tty media is used. Z_LOG_SOCK_HOST => Socket Host of the Log Client Applicable when used socket media Z_LOG_SOCK_PORT => Socket Port defaults to 9999 Applicable when used socket media Z_LOG_SOCK_TIMEOUT => Timeout on socket level logging defaults to 10; Z_LOG_UDEBUG => User debug off by default. If set to on only your Error/debug messages will be shown PHP's Own Internal Debug messages will not be shown.
Z_LOG_MEDIA
is set to file. Zigmoyd will log to a hard file in csv format. the log file name will be of current date pattern which is tuned through Z_LOG_DATE
. Here is an example log file. which youcan oen with a text editor even with a spreadsheet viewer like Excel, kspread etc.. /dev/pts/N
e.g. like /dev/pts/1
, /dev/pts/2 etc..
when you open a terminal it also have an id. (e.g. file name) which is used to uniquely identify that terminal.But in windows all terminal have a same \con
file name (I dont know much about windows) so its not possible to uniquely identify that terminal. and Zigmoyd requires you to pass the unique id of the terminal which it will use to log.Z_LOG_MEDIA
to tty
and set to Z_LOG_TTY
to the unique Id or the File Name of the terminal . e.g. Z_LOG_TTY = /dev/pts/2
Z_LOG_SOCK_HOST
and Z_LOG_SOCK_PORT
is used to specify the log server's Host and port. By default it uses port 9999
.you can simply develop a GUI Socket server application in any language that listen on 9999 port to view the log messages. however zigmpyd provides a CLI application that acts as a log server4 on 9999 port however port can be changed.
you can start that socket server log viewer application from zigmoyd terminal by invoking log command
by invoking the log command you created a CLI log server on which zigmoyd Logger will log.
zLogger::udebug("My debug message");
Z_LOG_UDEBUG
to on
. However you can turn it on at runtime invoking zLogger::udebugOn() or use zLogger::udebugOff() to turn it off.