Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Sep 18, 2019
2 parents 361fa2b + 6f6b32f commit df1950c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
('Content' copyWithRegex: 'Merge pull request #[0-9]+ from [^/]+/[0-9]*' matchesReplacedWith: ' ') copyReplaceAll: '-' with: ' '
-->

# [v1.1.1](https://github.com/jecisc/TinyLogger/compare/v1.1.0...v1.1.1) (2019-09-18)

# Bug fixes

* Do not depend on whole Mocketry ([a50d354](https://github.com/jecisc/TinyLogger/commit/a50d3543bf00e76d780d7d3f2fb205280364b637))

# Infrastructure

* Deprecated method in Pharo 8 ([7f2ab1c](https://github.com/jecisc/TinyLogger/commit/7f2ab1c7a6fc43d23801faed40383e2b6d4279c3))

# [v1.1.0](https://github.com/jecisc/TinyLogger/compare/v1.0.1...v1.1.0) (2019-06-16)

## New Features
Expand Down
19 changes: 19 additions & 0 deletions documentation/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For specific cases, a specialized logger can be used.
+ [Recording the execution of a task](#recording-the-execution-of-a-task)
* [Use another logger than the global logger](#use-another-logger-than-the-global-logger)
* [Clear your logger](#clear-your-logger)
* [Use special logger for tests](#use-special-logger-for-tests)


## Configure your logger
Expand Down Expand Up @@ -239,3 +240,21 @@ Each logger understands the method `#clearLog`. This method will have as effect
```Smalltalk
TinyLogger default clearLogger
```

## Use special logger for tests

It is probable that you might not want to have your default logger for tests. It is possible to archive this by overriding the #performTest method of your TestCase like this:

```Smalltalk
MyTestCase>>performTest
| testLogger |
testLogger := TinyLogger new
addTranscriptLogger;
yourself.
TinyCurrentLogger value: testLogger during: [
super performTest
]
```

Doing this, your tests will use the `testLogger` instead of the default logger in the image.
6 changes: 5 additions & 1 deletion src/BaselineOfTinyLogger/BaselineOfTinyLogger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ BaselineOfTinyLogger >> baseline: spec [

{ #category : #dependencies }
BaselineOfTinyLogger >> mocketry: spec [
spec baseline: 'Mocketry' with: [ spec repository: 'github://dionisiydk/Mocketry:v4.0.x' ]
spec
baseline: 'Mocketry'
with: [ spec
loads: #('Core');
repository: 'github://dionisiydk/Mocketry:v4.0.x' ]
]
2 changes: 1 addition & 1 deletion src/TinyLogger/TinyTranscriptLogger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ TinyTranscriptLogger >> clearLog [

{ #category : #logging }
TinyTranscriptLogger >> record: aString [
Transcript log: (String streamContents: [ :s | self record: aString on: s ])
Transcript trace: (String streamContents: [ :s | self record: aString on: s ])
]

0 comments on commit df1950c

Please sign in to comment.