diff --git a/src/TinyLogger-Tests/TinyAbstractLoggerTest.class.st b/src/TinyLogger-Tests/TinyAbstractLoggerTest.class.st index 5c4cc94..5b9e490 100644 --- a/src/TinyLogger-Tests/TinyAbstractLoggerTest.class.st +++ b/src/TinyLogger-Tests/TinyAbstractLoggerTest.class.st @@ -39,7 +39,7 @@ TinyAbstractLoggerTest >> testClearLog [ ] { #category : 'tests' } -TinyAbstractLoggerTest >> testIdentationString [ +TinyAbstractLoggerTest >> testIndentationString [ self subclassResponsibility ] diff --git a/src/TinyLogger-Tests/TinyFileLoggerTest.class.st b/src/TinyLogger-Tests/TinyFileLoggerTest.class.st index 2bbc87e..63ad7d7 100644 --- a/src/TinyLogger-Tests/TinyFileLoggerTest.class.st +++ b/src/TinyLogger-Tests/TinyFileLoggerTest.class.st @@ -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'. diff --git a/src/TinyLogger-Tests/TinyLoggerTest.class.st b/src/TinyLogger-Tests/TinyLoggerTest.class.st index 95e0f2e..1a1514d 100644 --- a/src/TinyLogger-Tests/TinyLoggerTest.class.st +++ b/src/TinyLogger-Tests/TinyLoggerTest.class.st @@ -270,7 +270,7 @@ TinyLoggerTest >> testHasLoggers [ ] { #category : 'tests' } -TinyLoggerTest >> testIdentationString [ +TinyLoggerTest >> testIndentationString [ | contents stream bool | self skipInPharo6. @@ -278,7 +278,7 @@ TinyLoggerTest >> testIdentationString [ logger removeAllLoggers; addStdoutLogger; - identationString: '--'. + indentationString: '--'. stream := '' writeStream. [ Stdio stub stdout willReturn: stream. diff --git a/src/TinyLogger-Tests/TinyStdoutLoggerTest.class.st b/src/TinyLogger-Tests/TinyStdoutLoggerTest.class.st index 56c82ea..a24b6d0 100644 --- a/src/TinyLogger-Tests/TinyStdoutLoggerTest.class.st +++ b/src/TinyLogger-Tests/TinyStdoutLoggerTest.class.st @@ -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. diff --git a/src/TinyLogger/TinyAbstractLogger.class.st b/src/TinyLogger/TinyAbstractLogger.class.st index 168539c..7d9ee61 100644 --- a/src/TinyLogger/TinyAbstractLogger.class.st +++ b/src/TinyLogger/TinyAbstractLogger.class.st @@ -45,7 +45,7 @@ TinyAbstractLogger >> clearLog [ ] { #category : 'accessing' } -TinyAbstractLogger >> identationString [ +TinyAbstractLogger >> indentationString [ ^ self subclassResponsibility diff --git a/src/TinyLogger/TinyLeafLogger.class.st b/src/TinyLogger/TinyLeafLogger.class.st index 650acba..6ce9d1b 100644 --- a/src/TinyLogger/TinyLeafLogger.class.st +++ b/src/TinyLogger/TinyLeafLogger.class.st @@ -55,9 +55,9 @@ TinyLeafLogger >> depth [ ] { #category : 'accessing' } -TinyLeafLogger >> identationString [ +TinyLeafLogger >> indentationString [ - ^ self parentLogger identationString + ^ self parentLogger indentationString ] { #category : 'accessing' } @@ -97,7 +97,7 @@ TinyLeafLogger >> recordPreambleOn: aStream [ self timestampFormatBlock cull: aStream cull: DateAndTime now. aStream << ' : '. - self depth timesRepeat: [ aStream nextPutAll: self identationString ] + self depth timesRepeat: [ aStream nextPutAll: self indentationString ] ] { #category : 'accessing' } diff --git a/src/TinyLogger/TinyLogger.class.st b/src/TinyLogger/TinyLogger.class.st index 84562a2..d507aa1 100644 --- a/src/TinyLogger/TinyLogger.class.st +++ b/src/TinyLogger/TinyLogger.class.st @@ -81,7 +81,7 @@ Class { #superclass : 'TinyAbstractLogger', #instVars : [ 'timestampFormatBlock', - 'identationString', + 'indentationString', 'depth', 'loggersMap' ], @@ -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' } @@ -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' }