Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: docs - getting started - add how to get for scala-cli #506

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 157 additions & 16 deletions docs/latest/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,43 +39,184 @@ logger-f can be used wit any effect library or `Future` as long as there is an i
If you use logback, please use this.
:::

<Tabs
groupId="slf4j"
defaultValue="slf4j-sbt"
values={[
{label: 'sbt', value: 'slf4j-sbt'},
{label: 'sbt (with libraryDependencies)', value: 'slf4j-sbt-lib'},
{label: 'scala-cli', value: 'slf4j-scala-cli'},
]}>
<TabItem value="slf4j-sbt">

In `build.sbt`,

```scala
Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-slf4j" % "@VERSION@"
)
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-slf4j" % "@VERSION@",
```

</TabItem>

<TabItem value="slf4j-sbt-lib">

In `build.sbt`,

```scala
libraryDependencies ++= Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-slf4j" % "@VERSION@",
)
```

</TabItem>

<TabItem value="slf4j-scala-cli">

```scala
//> using dep "io.kevinlee::logger-f-cats:@VERSION@"
//> using dep "io.kevinlee::logger-f-slf4j:@VERSION@"
```

</TabItem>
</Tabs>


#### With Log4j

<Tabs
groupId="log4j"
defaultValue="log4j-sbt"
values={[
{label: 'sbt', value: 'log4j-sbt'},
{label: 'sbt (with libraryDependencies)', value: 'log4j-sbt-lib'},
{label: 'scala-cli', value: 'log4j-scala-cli'},
]}>
<TabItem value="log4j-sbt">

In `build.sbt`,

```scala
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-log4j" % "@VERSION@",
```

</TabItem>

<TabItem value="log4j-sbt-lib">

In `build.sbt`,

```scala
Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-log4j" % "@VERSION@"
)
libraryDependencies ++= Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-log4j" % "@VERSION@",
)
```

</TabItem>

<TabItem value="log4j-scala-cli">

```scala
//> using dep "io.kevinlee::logger-f-cats:@VERSION@"
//> using dep "io.kevinlee::logger-f-log4j:@VERSION@"
```

</TabItem>
</Tabs>


#### With Log4s

<Tabs
groupId="log4s"
defaultValue="log4s-sbt"
values={[
{label: 'sbt', value: 'log4s-sbt'},
{label: 'sbt (with libraryDependencies)', value: 'log4s-sbt-lib'},
{label: 'scala-cli', value: 'log4s-scala-cli'},
]}>
<TabItem value="log4s-sbt">

In `build.sbt`,

```scala
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-log4s" % "@VERSION@",
```

</TabItem>

<TabItem value="log4s-sbt-lib">

In `build.sbt`,

```scala
libraryDependencies ++= Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-log4s" % "@VERSION@",
)
```

</TabItem>

<TabItem value="log4s-scala-cli">

```scala
Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-log4s" % "@VERSION@"
)
//> using dep "io.kevinlee::logger-f-cats:@VERSION@"
//> using dep "io.kevinlee::logger-f-log4s:@VERSION@"
```

</TabItem>
</Tabs>


#### With sbt Logging Util
For sbt plugin development,

<Tabs
groupId="sbt-logging"
defaultValue="sbt-logging-sbt"
values={[
{label: 'sbt', value: 'sbt-logging-sbt'},
{label: 'sbt (with libraryDependencies)', value: 'sbt-logging-sbt-lib'},
{label: 'scala-cli', value: 'sbt-logging-scala-cli'},
]}>
<TabItem value="sbt-logging-sbt">

In `build.sbt`,

```scala
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-sbt-logging" % "@VERSION@",
```

</TabItem>

<TabItem value="sbt-logging-sbt-lib">

In `build.sbt`,

```scala
libraryDependencies ++= Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-sbt-logging" % "@VERSION@",
)
```

</TabItem>

<TabItem value="sbt-logging-scala-cli">

```scala
Seq(
"io.kevinlee" %% "logger-f-cats" % "@VERSION@",
"io.kevinlee" %% "logger-f-sbt-logging" % "@VERSION@"
)
//> using dep "io.kevinlee::logger-f-cats:@VERSION@"
//> using dep "io.kevinlee::logger-f-sbt-logging:@VERSION@"
```

</TabItem>
</Tabs>


## Why
### Log without LoggerF
Expand Down