From eea3112859000a8bdd70533bcffa109a64aca0b6 Mon Sep 17 00:00:00 2001 From: Norbert Hartl Date: Wed, 14 Sep 2016 12:25:36 +0000 Subject: [PATCH] lineSeparator is now configurable --- .../FileLogger.class/instance/defaultLineSeparator.st | 3 +++ .../FileLogger.class/instance/lineSeparator.st | 4 ++++ .../FileLogger.class/instance/nextPutSerialized..st | 3 ++- .../Beacon-File.package/FileLogger.class/properties.json | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 repository/Beacon-File.package/FileLogger.class/instance/defaultLineSeparator.st create mode 100644 repository/Beacon-File.package/FileLogger.class/instance/lineSeparator.st diff --git a/repository/Beacon-File.package/FileLogger.class/instance/defaultLineSeparator.st b/repository/Beacon-File.package/FileLogger.class/instance/defaultLineSeparator.st new file mode 100644 index 0000000..e08c915 --- /dev/null +++ b/repository/Beacon-File.package/FileLogger.class/instance/defaultLineSeparator.st @@ -0,0 +1,3 @@ +defaults +defaultLineSeparator + ^ Character lf \ No newline at end of file diff --git a/repository/Beacon-File.package/FileLogger.class/instance/lineSeparator.st b/repository/Beacon-File.package/FileLogger.class/instance/lineSeparator.st new file mode 100644 index 0000000..4054911 --- /dev/null +++ b/repository/Beacon-File.package/FileLogger.class/instance/lineSeparator.st @@ -0,0 +1,4 @@ +accessing +lineSeparator + ^ lineSeparator ifNil: [ + lineSeparator := self defaultLineSeparator ] \ No newline at end of file diff --git a/repository/Beacon-File.package/FileLogger.class/instance/nextPutSerialized..st b/repository/Beacon-File.package/FileLogger.class/instance/nextPutSerialized..st index fb28cee..8429703 100644 --- a/repository/Beacon-File.package/FileLogger.class/instance/nextPutSerialized..st +++ b/repository/Beacon-File.package/FileLogger.class/instance/nextPutSerialized..st @@ -1,4 +1,5 @@ accessing nextPutSerialized: aString +self halt. super nextPutSerialized: aString. - self stream nextPut: Character lf \ No newline at end of file + self stream nextPut: self lineSeparator \ No newline at end of file diff --git a/repository/Beacon-File.package/FileLogger.class/properties.json b/repository/Beacon-File.package/FileLogger.class/properties.json index ce32dab..bc12311 100644 --- a/repository/Beacon-File.package/FileLogger.class/properties.json +++ b/repository/Beacon-File.package/FileLogger.class/properties.json @@ -9,7 +9,8 @@ "fileReference", "encoding", "binary", - "stream" + "stream", + "lineSeparator" ], "name" : "FileLogger", "type" : "normal"