diff --git a/docs/shipping/Code/dotnet.md b/docs/shipping/Code/dotnet.md index 9be1c7bc..f93734d4 100644 --- a/docs/shipping/Code/dotnet.md +++ b/docs/shipping/Code/dotnet.md @@ -15,8 +15,17 @@ drop_filter: [] --- + + + ## Logs +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + ### log4net **Before you begin, you'll need**: @@ -300,9 +309,9 @@ namespace dotnet_log4net } } ``` - - -### NLog + + + ### NLog **Before you begin, you'll need**: @@ -516,10 +525,9 @@ config.AddRule(LogLevel.Debug, LogLevel.Fatal, logzioTarget); LogManager.Configuration = config; ``` - - - -### LoggerFactory + + + ### LoggerFactory **Before you begin, you'll need**: @@ -780,8 +788,9 @@ hierarchy.Root.AddAppender(logzioAppender); hierarchy.Root.Level = Level.All; hierarchy.Configured = true; ``` - - + + + ### Serilog :::note @@ -910,6 +919,18 @@ namespace Example Replace `<` with the type that you want to assign to your logs. You will use this value to identify these logs in Logz.io. + + + + + + + + + + + + ## Metrics diff --git a/docs/shipping/Code/json.md b/docs/shipping/Code/json.md index eabc3838..fe1b9100 100644 --- a/docs/shipping/Code/json.md +++ b/docs/shipping/Code/json.md @@ -17,6 +17,31 @@ drop_filter: [] ## Bulk uploads over HTTP/HTTPS +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + This is an apple 🍎 + + + + + + This is a tangerine 🍊 + + + This is a mandarin 🍊 + + + + + + This is a banana 🍌 + + + + 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. diff --git a/docs/shipping/Other/invoke-restmethod.md b/docs/shipping/Other/invoke-restmethod.md index 6a990da6..8d533d0f 100644 --- a/docs/shipping/Other/invoke-restmethod.md +++ b/docs/shipping/Other/invoke-restmethod.md @@ -14,9 +14,55 @@ metrics_alerts: [] drop_filter: [] --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +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://<>:8071?token=<>"&"<> -InFile <> +``` + +{@include: ../../_include/general-shipping/replace-placeholders.html} + +* {@include: ../../_include/log-shipping/type.md} Otherwise, the default `type` is `http-bulk`. +* Replace `<>` 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). + + + + 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. @@ -54,4 +100,8 @@ Invoke-RestMethod -method POST -Uri https://<>:8071?token=< + + + \ No newline at end of file