Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/TinyLogger-Tests/TinyAbstractLoggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TinyAbstractLoggerTest >> testClearLog [
]

{ #category : 'tests' }
TinyAbstractLoggerTest >> testIdentationString [
TinyAbstractLoggerTest >> testIndentationString [
self subclassResponsibility
]

Expand Down
4 changes: 2 additions & 2 deletions src/TinyLogger-Tests/TinyFileLoggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ TinyFileLoggerTest >> testFileName [
]

{ #category : 'tests' }
TinyFileLoggerTest >> testIdentationString [
TinyFileLoggerTest >> testIndentationString [

log := (self fileNameNumber: 1) asFileReference.
logger := self actualClass for: parentLogger named: log basename.
parentLogger identationString: '--'.
parentLogger indentationString: '--'.

logger execute: [ logger record: 'this is a test' ] recordedAs: 'block'.

Expand Down
4 changes: 2 additions & 2 deletions src/TinyLogger-Tests/TinyLoggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,15 @@ TinyLoggerTest >> testHasLoggers [
]

{ #category : 'tests' }
TinyLoggerTest >> testIdentationString [
TinyLoggerTest >> testIndentationString [

| contents stream bool |
self skipInPharo6.
bool := false.
logger
removeAllLoggers;
addStdoutLogger;
identationString: '--'.
indentationString: '--'.
stream := '' writeStream.
[
Stdio stub stdout willReturn: stream.
Expand Down
4 changes: 2 additions & 2 deletions src/TinyLogger-Tests/TinyStdoutLoggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ TinyStdoutLoggerTest >> testClearLog [
]

{ #category : 'tests' }
TinyStdoutLoggerTest >> testIdentationString [
TinyStdoutLoggerTest >> testIndentationString [

| stream |
self skipInPharo6.
stream := '' writeStream.
[
Stdio stub stdout willReturn: stream.
parentLogger identationString: '--'.
parentLogger indentationString: '--'.
logger execute: [ logger record: 'This is a test' ] recordedAs: 'block'.
self assert: (stream contents asString lines last includesSubstring: '--This is a test') ] ensure: [
Stdio recoverFromGHMutation.
Expand Down
2 changes: 1 addition & 1 deletion src/TinyLogger/TinyAbstractLogger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TinyAbstractLogger >> clearLog [
]

{ #category : 'accessing' }
TinyAbstractLogger >> identationString [
TinyAbstractLogger >> indentationString [

<ignoreForCoverage>
^ self subclassResponsibility
Expand Down
6 changes: 3 additions & 3 deletions src/TinyLogger/TinyLeafLogger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ TinyLeafLogger >> depth [
]

{ #category : 'accessing' }
TinyLeafLogger >> identationString [
TinyLeafLogger >> indentationString [

^ self parentLogger identationString
^ self parentLogger indentationString
]

{ #category : 'accessing' }
Expand Down Expand Up @@ -97,7 +97,7 @@ TinyLeafLogger >> recordPreambleOn: aStream [
<compilerOptions: #( #+ optionInlineTimesRepeat )>
self timestampFormatBlock cull: aStream cull: DateAndTime now.
aStream << ' : '.
self depth timesRepeat: [ aStream nextPutAll: self identationString ]
self depth timesRepeat: [ aStream nextPutAll: self indentationString ]
]

{ #category : 'accessing' }
Expand Down
22 changes: 11 additions & 11 deletions src/TinyLogger/TinyLogger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Class {
#superclass : 'TinyAbstractLogger',
#instVars : [
'timestampFormatBlock',
'identationString',
'indentationString',
'depth',
'loggersMap'
],
Expand Down Expand Up @@ -225,21 +225,21 @@ TinyLogger >> hasLoggers [
^ self loggersMap isNotEmpty
]

{ #category : 'accessing' }
TinyLogger >> identationString [

^ identationString
{ #category : 'nesting' }
TinyLogger >> increaseDepthLevel [
self depth: self depth + 1
]

{ #category : 'accessing' }
TinyLogger >> identationString: anObject [
TinyLogger >> indentationString [

identationString := anObject
^ indentationString
]

{ #category : 'nesting' }
TinyLogger >> increaseDepthLevel [
self depth: self depth + 1
{ #category : 'accessing' }
TinyLogger >> indentationString: aString [

indentationString := aString
]

{ #category : 'initialization' }
Expand All @@ -249,7 +249,7 @@ TinyLogger >> initialize [
self depth: 0.
self timestampFormatBlock: self defaultTimestampFormatBlock.
self loggersMap: Dictionary new.
self identationString: String tab
self indentationString: String tab
]

{ #category : 'accessing' }
Expand Down