Skip to content

Commit

Permalink
Test tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
“nico-shishkin” committed Sep 7, 2023
1 parent b85c41b commit ee70b86
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 10 deletions.
39 changes: 30 additions & 9 deletions docs/shipping/Code/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ drop_filter: []
---





## Logs

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="log4net" label="log4net" default>

### log4net

**Before you begin, you'll need**:
Expand Down Expand Up @@ -300,9 +309,9 @@ namespace dotnet_log4net
}
}
```


### NLog
</TabItem>
<TabItem value="NLog" label="NLog">
### NLog

**Before you begin, you'll need**:

Expand Down Expand Up @@ -516,10 +525,9 @@ config.AddRule(LogLevel.Debug, LogLevel.Fatal, logzioTarget);
LogManager.Configuration = config;
```




### LoggerFactory
</TabItem>
<TabItem value="LoggerFactory" label="LoggerFactory">
### LoggerFactory

**Before you begin, you'll need**:

Expand Down Expand Up @@ -780,8 +788,9 @@ hierarchy.Root.AddAppender(logzioAppender);
hierarchy.Root.Level = Level.All;
hierarchy.Configured = true;
```


</TabItem>
<TabItem value="Serilog" label="Serilog">

### Serilog

:::note
Expand Down Expand Up @@ -910,6 +919,18 @@ namespace Example

Replace `<<TYPE>` with the type that you want to assign to your logs. You will use this value to identify these logs in Logz.io.

</TabItem>
</Tabs>











## Metrics

Expand Down
25 changes: 25 additions & 0 deletions docs/shipping/Code/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ drop_filter: []

## Bulk uploads over HTTP/HTTPS

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="apple" label="Apple" default>
This is an apple 🍎
</TabItem>

<TabItem value="orange" label="Orange">
<Tabs>
<TabItem value="tangerine" label="Tangerine" default>
This is a tangerine 🍊
</TabItem>
<TabItem value="mandarin" label="Mandarin">
This is a mandarin 🍊
</TabItem>
</Tabs>
</TabItem>

<TabItem value="banana" label="Banana">
This is a banana 🍌
</TabItem>
</Tabs>


If you want to ship logs from your code but don't have a library in place, you can send them directly to the Logz.io listener as a minified JSON file.

The listeners accept bulk uploads over an HTTP/HTTPS connection or TLS/SSL streams over TCP.
Expand Down
52 changes: 51 additions & 1 deletion docs/shipping/Other/invoke-restmethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,55 @@ metrics_alerts: []
drop_filter: []
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="Windows" label="Windows" default>


Invoke-RestMethod is a command to interact with REST APIs in PowerShell. Invoke-RestMethod is a quick and easy way to test your configuration or troubleshoot your connectivity to Logz.io.

You can upload JSON or plain text files.


### Limitations1111

* Max body size is 10 MB (10,485,760 bytes)
* Each log line must be 500,000 bytes or less
* If you include a `type` field in the log, it overrides `type` in the request header

### Upload a JSON log file1111

**Before you begin, you'll need**:
[PowerShell](https://docs.microsoft.com/en-us/powershell/)




### Upload the file1111

If you want to ship logs from your code but don't have a library in place,
you can send them directly to the Logz.io listener as a minified JSON file.

```shell
Invoke-RestMethod -method POST -Uri https://<<LISTENER-HOST>>:8071?token=<<LOG-SHIPPING-TOKEN>>"&"<<LOG-TYPE>> -InFile <<PATH/TO/LOG/FILE.JSON>>
```
{@include: ../../_include/general-shipping/replace-placeholders.html}
* {@include: ../../_include/log-shipping/type.md} Otherwise, the default `type` is `http-bulk`.
* Replace `<<PATH/TO/LOG/FILE.JSON>>` with the path to your log file.
### Check Logz.io for your logs
Give your logs some time to get from your system to ours, and then open [Open Search Dashboards](https://app.logz.io/#/dashboard/osd).
If you still don't see your logs, see [log shipping troubleshooting]({{site.baseurl}}/user-guide/log-shipping/log-shipping-troubleshooting.html).
</TabItem>
<TabItem value="Linux" label="Linux">
Invoke-RestMethod is a command to interact with REST APIs in PowerShell. Invoke-RestMethod is a quick and easy way to test your configuration or troubleshoot your connectivity to Logz.io.
You can upload JSON or plain text files.
Expand Down Expand Up @@ -54,4 +100,8 @@ Invoke-RestMethod -method POST -Uri https://<<LISTENER-HOST>>:8071?token=<<LOG-S
Give your logs some time to get from your system to ours, and then open [Open Search Dashboards](https://app.logz.io/#/dashboard/osd).
If you still don't see your logs, see [log shipping troubleshooting]({{site.baseurl}}/user-guide/log-shipping/log-shipping-troubleshooting.html).
If you still don't see your logs, see [log shipping troubleshooting]({{site.baseurl}}/user-guide/log-shipping/log-shipping-troubleshooting.html).
</TabItem>
</Tabs>

0 comments on commit ee70b86

Please sign in to comment.