Collect Logs & Diagnostic Information(UI)

  • upload couchbase is checkmarked

#upload to host
[]
#coustemer name
[
___]

what should i give here host and name?
(i used “uploads.couchbase.com” once , showed one http link and ran that in terminal it showed reacted file , is that a crrt way??)

Hello @boby,

As explained in the documentation this is used to upload the logs directly to Couchbase Support. The host name should be the one pre-filled in, and the customer name should be your company name. This option only useful if you are working directly with Couchbase Support or Pre-sales. Otherwise there is no point in using it, if you wish to look at the logs yourself then you can unclick the upload option.

(i used “uploads.couchbase.com” once , showed one http link and ran that in terminal it showed reacted file , is that a crrt way??)

Not sure what you mean by “it showed reacted file”, do you mean redacted?

i understood tq @pvarley

and in " /opt/couchbase/var/lib/couchbase/logs/eventing.log ." it will be collecting all log of eventing (live)
but please can you say that, does that eventing.log will be permanent in .txt file any where so that we can do filter and other stuff??

Boby,

./logs/eventing.log

The log file /opt/couchbase/var/lib/couchbase/logs/eventing.log is for system level logging keep in mind this is not the file the output of the log(…) statements in your actual Javascript code for your Eventing functions. What goes into this log file is supervisor information for the Eventing servers and house keeping information on the Function’s life cycle (not the logic of the Function). An end user can not write a message (via a Function handler) to this log file it is intended for debugging for customers that are on support contracts. I believe redaction in the context of system logs is for things like cURL credentials.

./data/@eventing/<<function_name>>.log

The log(…) statements that you as a user add to your JavaScript go to handler specific logs live in a different set of rolling log files /opt/couchbase/var/lib/couchbase/data/@eventing/<<function_name>>.log . The information that goes to these log files is solely dependent the business logic of the Function via log(…) statements put inside the individual Function’s JavaScript. These files are not uploaded to support.

Other

I’m not very clear on why you would want to “do filter and other stuff” on either log file type.

1 Like

hey @jon.strabala can u please say the way to send message to eventing.log with function
(am using localhost)

Boby,

Again your JavaScript code can never write any “user” messages to eventing.log or the system log (as this only holds system and house keeping log messages only). You can only control the logging level (I like Warning by default).

You can only emit custom log messages from your JavaScript to Application logs allow you to identify and capture various various business logic related related activities and errors via user defined messages specific to each Eventing function.

Unlike the System Log, Application logs can be viewed in the UI for any deployed function by clicking on the function’s “Log” hyperlink in the Eventing page section for the given Function. In addition the log can be found in the files system.

Unlike the system log there is currently is no logging level for Application logs. Application logs are primarily used for development and debugging business logic.

Application logs are named the same as the function name ending in “.log” when you create an Eventing function, say “MyFunc” the default handler is as follows:

function OnUpdate(doc, meta) {
    log('docId', meta.id);
}
function OnDelete(meta) {
}

Thus on any mutation add/change the Application log for “MyFunc” will be called MyFunc.log. Nothing is logged for deletions or expirys ( you could of course put in a log statement if you want in the OnDelete handler perhaps:

log('just deleted or expired', meta.id)

In addition to viewing in the UI (for 6.5+) you can find the Application logs in the following platform specific file system areas:

For Linux
/opt/couchbase/var/lib/couchbase/data/@eventing/

For Windows
C:\Program Files\Couchbase\Server\var\lib\couchbase\data\@eventing\

For macOS or OS X
/Users/<user>/Library/Application\ Support/Couchbase/var/lib/couchbase/data/@eventing/