From 8ee1c87220cae189dd96705a0795d870483c2dd8 Mon Sep 17 00:00:00 2001 From: Michael Flisar Date: Tue, 19 Nov 2024 09:17:57 +0100 Subject: [PATCH] docu --- documentation/docs/migration/v7.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/documentation/docs/migration/v7.md b/documentation/docs/migration/v7.md index 098888e..daba122 100644 --- a/documentation/docs/migration/v7.md +++ b/documentation/docs/migration/v7.md @@ -6,15 +6,25 @@ icon: material/arrow-up-box Version `7.*` is a kotlin multiplatform rewrite, that's why some fundamantal changes needed to be done! -Some things have become extension functions to provide target specific implementations and overloads: +Overall some things have become extension functions to provide target specific implementations. Platform specific functions and overloads have been added to provide a good single platform experience and some typos have been fixed as well. + +Following is an overview on what has changed and shows how you can migrate your project. #### Logger setup classes I do provide platform specific `create` function to make single platform usage easier. On android those do look like following now: ```kotlin -val setup = FileLoggerSetup.Daily.create(context, fileBaseName = "log_daily") -val setup2 = FileLoggerSetup.FileSize.create(context, maxFileSizeInBytes = 1000 * 10 /* 10 kB */, fileBaseName = "log_size", filesToKeep = 2) +val setup = FileLoggerSetup.Daily.create( + context, + fileBaseName = "log_daily" +) +val setup2 = FileLoggerSetup.FileSize.create( + context, + maxFileSizeInBytes = 1000 * 10 /* 10 kB */, + fileBaseName = "log_size", + filesToKeep = 2 +) ``` In MP projects you can simply use the classes themself if you want to. @@ -23,8 +33,6 @@ In MP projects you can simply use the classes themself if you want to. To provide platform specific implementations, some functions needed to be converted to extension functions: -* `getAllExistingLogFiles` - new import: `import com.michaelflisar.lumberjack.core.getAllExistingLogFiles` -* `Level.priority` - new import: `import com.michaelflisar.lumberjack.core.classes.priority` -* `getLatestLogFiles` => `getLatestLogFile` (also fixed a typo) \ No newline at end of file +* `getAllExistingLogFiles` (new import: `import com.michaelflisar.lumberjack.core.getAllExistingLogFiles`) +* `Level.priority` (new import: `import com.michaelflisar.lumberjack.core.classes.priority`) +* `getLatestLogFiles` => `getLatestLogFile` (also fixed a typo, new import: `import com.michaelflisar.lumberjack.core.getLatestLogFile`) \ No newline at end of file