< Back

Read-CouchDBLog

Sun Jan 19, 2020 6:32 pm

NAME Read-CouchDBLog



SYNOPSIS

Read or tail log.





SYNTAX

Read-CouchDBLog [[-Path] <String>] [[-Level] <String>] [-Follow] [[-Tail] <Int32>] [<CommonParameters>]





DESCRIPTION

Read, tail and follow CouchDB log (couch.log).





PARAMETERS

-Path <String>

The path of log file. Default, is C:\\CouchDB\\couch.log on Windows and /var/log/couchdb/couch.log on Unix.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Level <String>

Select level of log. Default is "info".

Available levels:

debug: Detailed debug logging.

info: Informative logging. Includes HTTP requests headlines, startup of an external processes etc.

notice

warning: Warning messages are alerts about edge situations that may lead to errors.

error: Error level includes only things that go wrong, like crash reports and HTTP error responses (5xx

codes).

critical

alert

emergency



Required? false

Position? 2

Default value info

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Follow [<SwitchParameter>]

Output appended data as the file grows.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Tail <Int32>

The last n lines of log. Default is 10.



Required? false

Position? 3

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Read-CouchDBLog -Level warning -Follow



Append and wait new warning entry on default log.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Read-CouchDBLog -Path /custom/couchdb/log/couch.log -Level error | Out-File error_couchdb.log



Read only error,critical,alert,emergency log in a custom path and redirect to a new file.











RELATED LINKS

https://pscouchdb.readthedocs.io/en/lat ... ad-the-log