File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed
Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -73,22 +73,25 @@ local function l_report_loads()
7373 local openlog
7474 local syslog
7575 local closelog
76+ local logInfo
7677 if (posix .syslog ) then
7778 if (type (posix .syslog ) == " table" ) then
7879 -- Support new style posix.syslog table
7980 openlog = posix .syslog .openlog
8081 syslog = posix .syslog .syslog
8182 closelog = posix .syslog .closelog
83+ logInfo = posix .syslog .LOG_INFO
8284 else
8385 -- Support original style posix.syslog functions
8486 openlog = posix .openlog
8587 syslog = posix .syslog
8688 closelog = posix .closelog
89+ logInfo = 6
8790 end
8891
8992 openlog (" ModuleUsageTracking" )
9093 for k ,msg in pairs (s_msgT ) do
91- syslog (posix . syslog . LOG_INFO , msg )
94+ syslog (logInfo , msg )
9295 end
9396 closelog ()
9497 else
Original file line number Diff line number Diff line change @@ -77,22 +77,25 @@ local function l_report_loads()
7777 local openlog
7878 local syslog
7979 local closelog
80+ local logInfo
8081 if (posix .syslog ) then
8182 if (type (posix .syslog ) == " table" ) then
8283 -- Support new style posix.syslog table
8384 openlog = posix .syslog .openlog
8485 syslog = posix .syslog .syslog
8586 closelog = posix .syslog .closelog
87+ logInfo = posix .syslog .LOG_INFO
8688 else
8789 -- Support original style posix.syslog functions
8890 openlog = posix .openlog
8991 syslog = posix .syslog
9092 closelog = posix .closelog
93+ logInfo = 6
9194 end
9295
9396 openlog (" ModuleUsageTracking" )
9497 for i = 1 , # s_msgA do
95- syslog (posix . syslog . LOG_INFO , s_msgA [i ])
98+ syslog (logInfo , s_msgA [i ])
9699 end
97100 closelog ()
98101 else
Original file line number Diff line number Diff line change @@ -77,22 +77,25 @@ local function l_report_loads()
7777 local openlog
7878 local syslog
7979 local closelog
80+ local logInfo
8081 if (posix .syslog ) then
8182 if (type (posix .syslog ) == " table" ) then
8283 -- Support new style posix.syslog table
8384 openlog = posix .syslog .openlog
8485 syslog = posix .syslog .syslog
8586 closelog = posix .syslog .closelog
87+ logInfo = posix .syslog .LOG_INFO
8688 else
8789 -- Support original style posix.syslog functions
8890 openlog = posix .openlog
8991 syslog = posix .syslog
9092 closelog = posix .closelog
93+ logInfo = 6
9194 end
9295
9396 openlog (" ModuleUsageTracking" )
9497 for i = 1 , # s_msgA do
95- syslog (posix . syslog . LOG_INFO , s_msgA [i ])
98+ syslog (logInfo , s_msgA [i ])
9699 end
97100 closelog ()
98101 else
Original file line number Diff line number Diff line change @@ -102,22 +102,25 @@ Use SitePackage.lua to send a message to syslog.::
102102 local openlog
103103 local syslog
104104 local closelog
105+ local logInfo
105106 if (posix.syslog) then
106107 if (type(posix.syslog) == "table" ) then
107108 -- Support new style posix.syslog table
108109 openlog = posix.syslog.openlog
109110 syslog = posix.syslog.syslog
110111 closelog = posix.syslog.closelog
112+ logInfo = posix.syslog.LOG_INFO
111113 else
112114 -- Support original style posix.syslog functions
113115 openlog = posix.openlog
114116 syslog = posix.syslog
115117 closelog = posix.closelog
118+ logInfo = 6
116119 end
117120
118121 openlog("ModuleUsageTracking")
119122 for k,msg in pairs(s_msgT) do
120- syslog(posix.syslog.LOG_INFO , msg)
123+ syslog(logInfo , msg)
121124 end
122125 closelog()
123126 else
You can’t perform that action at this time.
0 commit comments