37/* Log function compatible with the syslog standard, usefull for filtering logs, and logging networkly (todo).
38 0 Emergency emerg (panic) System is unusable. A "panic" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call.
39 1 Alert alert Action must be taken immediately. Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection.
40 2 Critical crit Critical conditions. Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection.
41 3 Error err (error) Error conditions. Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time.
42 4 Warning warning (warn) Warning conditions. Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time.
43 5 Notice notice Normal but significant condition. Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential problems - no immediate action required.
44 6 Informational info Informational messages. Normal operational messages - may be harvested for reporting, measuring throughput, etc. - no action required.
45 7 Debug debug Debug-level messages. Info useful to developers for debugging the application, not useful during operations.
46*/
47
48// For exposure to Lua
49void NEO_ENGINE_EXPORT infoLog(constchar* s, constchar* function, constchar* filename, int line);
50
51#ifndef SWIG
52// Only give the filename and not the path
53#ifndef WIN32
54#define __SFILENAME__ \
55(strrchr(__FILE__,'/') \
56? strrchr(__FILE__,'/')+1 \
57: __FILE__ \
58)
59#else
60#define __SFILENAME__ \
61(strrchr(__FILE__,'\\') \
62? strrchr(__FILE__,'\\')+1 \
63: __FILE__ \
64)
65#endif
66
67// for the moment let s just simply log if the message has a severity lower than the env variable