lite_logger 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2f3c627b39839930ebd45fd9f908cbbd8a3d0392af6f22318ec23e4efee5ec8
4
- data.tar.gz: 13c2b2f29b407d833149fa753ade41b6c9992140f3a374b004394338866fc87b
3
+ metadata.gz: 63889c64a548e885015ab2fdea1c41db4750fdf29760bc264531414a2e445c69
4
+ data.tar.gz: 88df472c1fc638c10194a23a5b6382e3e0c425188c75362898afa8f939a86e36
5
5
  SHA512:
6
- metadata.gz: ddd4cc3ca1f15c8db1166351fc97fcfc10ce4cdfbca4ca1fdc97ae85153a3f1d584e23757970fd12e9e628438be97ad878933ebfcdf1df6d73d734660f543c4b
7
- data.tar.gz: 54a14d4c2f72b12f50c3bfcbe9f403aaecc0026ad7c70d8273f1bbfcdd35da2a37beca4fb648ff27d76aaf8c6c1af21611e1ccbfcbf963cd073d0b45cd79136c
6
+ metadata.gz: 77e1b370c88d858e7a447f5a68b27862325a763990f8f9e87ae31eecaa1d13e88168542dc1d3db84334b701c143aca3fb424ce9cf4c595981cc6f655917e19b6
7
+ data.tar.gz: 25cfe01d9cf287b225ddce98d74fc70637ece8f89cf37307a36e0166d3d853e10926f85823c56c8cba137e3f4733669d61454e13a91419e3eb2a95bcda252cc9
data/CHANGELOG.md CHANGED
@@ -26,3 +26,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
26
26
  ## [0.1.4] - 2024-07-09
27
27
 
28
28
  - Remove duplicated call to `Time.now`
29
+
30
+ ## [0.1.5] - 2024-07-10
31
+
32
+ - Bug fix: Remove uninitialized constant LiteLogger::Logger::StringIO
33
+ - Readme updated with example on how to log to a file.
34
+
35
+ ## [0.1.6] - 2024-07-10
36
+
37
+ - Bug fix: Include the intended fix that was missing on the previous version
data/README.md CHANGED
@@ -30,7 +30,7 @@ gem install lite_logger
30
30
 
31
31
  ### Example
32
32
 
33
- In a Ruby class:
33
+ #### In a Ruby class:
34
34
 
35
35
  ```ruby
36
36
  # Require the gem
@@ -54,6 +54,22 @@ class MyClass
54
54
  end
55
55
  ```
56
56
 
57
+ #### Logging to a file
58
+
59
+ ```ruby
60
+ require 'lite_logger'
61
+
62
+ @logger = LiteLogger::Logger.new
63
+ @logger.destination = './application.log'
64
+ @logger.info('Application started!')
65
+ ```
66
+
67
+ Output:
68
+
69
+ ```
70
+ 2024-07-10 18:58:07 -0300 [INFO] Application started!
71
+ ```
72
+
57
73
  ## Contributing
58
74
 
59
75
  Bug reports and pull requests are welcome: <https://github.com/dmferrari/lite_logger/pulls>.
@@ -39,7 +39,7 @@ module LiteLogger
39
39
 
40
40
  def write_log(message)
41
41
  case @destination
42
- when $stdout, $stderr, StringIO
42
+ when $stdout, $stderr
43
43
  @destination.puts message
44
44
  else
45
45
  File.open(@destination, 'a') { |file| file.puts message }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LiteLogger
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Ferrari