Skip to content

Commit e1040d3

Browse files
committed
Fix to Logger for multi-byte log data
1 parent a887047 commit e1040d3

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

Core/MiServer.dyalog

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
:Field Public TID¯1 Thread ID Server is running under
88
:Field Public BlockSize640000 Blocksize when returning files
99

10-
:Field Public SessionHandler⎕NS ''
11-
:Field Public Authentication⎕NS ''
12-
:Field Public Logger⎕NS ''
13-
:Field Public Application⎕NS ''
10+
:Field Public SessionHandler
11+
:Field Public Authentication
12+
:Field Public Logger
13+
:Field Public Application
1414
:Field Public PageTemplates
1515
:Field Public Encoders pointers to instances of content encoders
1616
:Field Public Datasources
@@ -288,6 +288,10 @@
288288
Make config;CongaVersion;rc;allocated;port;ports
289289
:Access Public
290290
:Implements Constructor
291+
SessionHandler⎕NS''
292+
Authentication⎕NS''
293+
Logger⎕NS''
294+
Application⎕NS''
291295

292296
SessionHandler.GetSession{} So we can always
293297
SessionHandler.HouseKeeping{} call these fns

Extensions/Logger.dyalog

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
:field private EOL End Of Line
1313

1414
missing{0:'-' }
15+
Char⎕DR ' '
1516

1617
Make ms;file;log
1718
:Access public
@@ -80,11 +81,10 @@
8081
:EndTrap
8182

8283
:Trap 22 file name error
83-
TieNofn ⎕NTIE 0 34
84+
TieNofn ⎕NTIE 0
8485
:Else
8586
:Trap 0
86-
⎕NUNTIE fn ⎕NCREATE 0
87-
TieNofn ⎕NTIE 0 34
87+
TieNo{0 ⎕NTIE⎕NUNTIE ⎕NCREATE 0}fn
8888
:Else
8989
1 ##.ms.Log'Unable to open log file "',fn,'"'
9090
:Return
@@ -93,7 +93,7 @@
9393
r0TieNo
9494
9595

96-
tryGetting{0::('-'@(' '=))(⎕DM),'-retrieving-"',,'"' }
96+
tryGetting{0::('-'@(' '=))(⎕DM),'-retrieving-"',(),'"' }
9797

9898
Log req;addr;user;ts;method;page;status;msec;bytes
9999
:Access public
@@ -118,6 +118,9 @@
118118

119119
ClearCache
120120
:Hold 'Lumberjack'
121+
:If Char⎕DR Cache
122+
Cache('?'@{Char⎕DR¨})Cache
123+
:EndIf
121124
Cache ⎕NAPPEND TieNo
122125
Cache''
123126
:EndHold

0 commit comments

Comments
 (0)