--- a/MiniLogger.st Thu Feb 23 12:18:37 2012 +0000
+++ b/MiniLogger.st Thu Feb 23 14:57:53 2012 +0000
@@ -148,8 +148,9 @@
!
log: message severity: severity facility: facility originator: originator attachment: attachment
+ "Pricipal logging method. This mimics VM __stxLog__()"
- "Pricipal logging method. This mimics VM __stxLog__()"
+ | ts |
stream isNil ifTrue:[self initializeStream].
@@ -162,8 +163,22 @@
space.
stream nextPut:$(.
- Timestamp now printOn:Stderr format:'%(year)-%(mon)-%(day) %h:%m:%s'.
+
+ "Ugly code but much faster"
+ ts := Timestamp now.
+ (ts year - 2000) printOn: stream.
+ stream nextPut: $-.
+ ts month printOn: stream base: 10 size:2 fill:$0.
+ stream nextPut: $-.
+ ts day printOn: stream base: 10 size:2 fill:$0.
+ stream space.
+ ts hour printOn: stream base: 10 size:2 fill:$0.
+ stream nextPut: $:.
+ ts minute printOn: stream base: 10 size:2 fill:$0.
+ stream nextPut: $:.
+ ts second printOn: stream base: 10 size:2 fill:$0.
stream nextPut:$).
+
stream space.
stream nextPutAll: message.
stream cr.
@@ -186,9 +201,7 @@
!MiniLogger class methodsFor:'documentation'!
version_SVN
- ^ '$Id: MiniLogger.st 10761 2012-01-19 11:46:00Z vranyj1 $'
+ ^ '$Id: MiniLogger.st 10785 2012-02-23 14:57:53Z vranyj1 $'
! !
MiniLogger initialize!
-
-