Log Level Configuration - nopcommerce

Where can I configure the log level?
In our Plugin, we've got some logger.Debug("...") and logger.Information("...") but I'm only seeing the Information ones in the Admin site.
I assume the fix is changing the log level to Debug, no?

Yes, by design it's disabled, thus even if you change the log level from Information to Debug it won't make any difference, and you won't able see any log at admin area.
To write debug log you have to enable debug log level at Nop.Services.Logging> IsEnabled rebuild the solution and run it again.
To implement it with plugin, you would need to override IsEnabled method and switch as per user input.
There is an alternate way to write debug log instead:
_logger.InsertLog(Nop.Core.Domain.Logging.LogLevel.Debug, "debug info here");

Related

Deno: Disable warning logs (WARN) in console

I'm new to Deno and I see that Deno is showing all warning logs (WARN) in the console.
Is there an option to disable this behavior?
UPDATE:
eventually, I think I need to be able to change the log level of Deno's default logger for its consoleHandler.
for example, when I'm using the Deno's fetch API, I don't want to see a lot of warnings about request/response size, etc.
There is Fen framework for deno that can do that: here is link

console.debug not showing in firebase functions log

console.log("Log") shows up as an Info level log in the firebase functions log.
console.debug("Debug") does not show up at all.
I have the log viewer set to display all log levels.
Is there something I need to do to support different log levels?
This is for the fulfillment for a dialogflow application, if this matters. I would guess it doesn't but it's my only experience with firebase.
console.debug is for internal messages.
You need to use:
console.log() commands have the INFO log level.
console.info() commands have the INFO log level.
console.warn() commands have the ERROR log level.
console.error() commands have the ERROR log level.
Check the documentation.

Aviarc Debug command not working?

I've been trying to send some strings out to a file somewhere to help with testing, by doing something like:
<debug text="This is a test"/>
But I can't find where it outputs to. I've been looking in the aviarc-server.[date].log file, not sure where else it would go.
The command outputs at INFO level - what is your log level set to? You can change the log level setting in the Admin application under Server Configuration. It is set to WARN by default. You can also use the Realtime Log feature from the Admin app to see tail the log within the browser.

No eventlogs from BizTalk

I've got a new production computer and installed my BizTalk app on there. The problem is that I don't see any messages in the event log, nor from my BizTalk app or BizTalk Server itself. The only message that appears in the event log is the following:
The following BizTalk host instance has initialized successfully.
BizTalk host name: BizTalkServerApplication
Windows service name: BTSSvc$BizTalkServerApplication
The source of that message is BizTalk Server. And no messages at all, even no logs about errors which I suppose already took place.
Just a quick thought incase you are still having problems.
I tried to write to the event log with a source type that didnt already exist and my BizTalk Host user account didn’t have permissions to create a new source type. This meant I never saw the entry in the event log.
E.g. (from example #Bill Osuch)
System.Diagnostics.EventLog.WriteEntry("MyBiztalkApp", "oh i did something");
Make sure either the MyBiztalkApp source exists or that your user has permissions on the event log to create it.
Also, if you have a lot of messages going through BizTalk you will probably want to implement your own logging so your event log doesn’t fill up. We used Log4Net for our implementation and a database to store messages.
If you're not getting any errors (suspended messages) as the messages process, you're not going to see anything in the app log. You could try adding an Expression shape to your orchestration and manually writing out some debug info:
System.Diagnostics.EventLog.WriteEntry("event type", "whatever...");
Does your application actually use the BiztalkServerApplication host? Check in the Biztalk Administration Console if all the host instances are indeed running. Is your application fully started? Messages are "put on hold" if your receive location is disabled for example.
To check this functionality, write to event log after every operation or shape in BizTalk orchestration.
Scenario-
Suppose you have to assigned a value to xpath of node in a map after transformation so in message assignment shape after you assign some value, you can write eventlog to admin console.
Ex. Suppose we have already initialized - "orderType" as "PO" in our expression shape and now we have to assign the value of "orderType" to the xpath of a node in our map then-
Shape- MessageAssignment(Under constructMessage Shape after transformation of map)
xpath(msgGetOrderReq, "/[local-name()='CustomerOrders' and namespace-uri()='http://example.com/EAI/IEmployee/v1.0']/[local-name()='ordertype' and namespace-uri()='http://example.com/EAI/IEmployee/v1.0']") = ordertype;
Next to this we want to print this information on the admin console so we need to write:-
System.Diagnostics.EventLog.WriteEntry("msgGetOrderReq", ordertype, msgGetOrderReq);
Build the project, Deploy and GAC it. Restart the host instance. Run the orchestration, process something and now you will be able to see the logs in admin console.
Regards
Mayank

Saving error message and stack on asp.net

I've designed a website that works through my own PC.
I set the IIS to work with Custom Errors in case user ran into some unknown exception.
I've also added a check that the error page will e-mail me whenever it found an error.
Can I somehow get the error information (Stack and description) from the error page?
I encourages you to use Open Source library out there that provided functional need. My recommendation is ELMAH.
With a few line of settings in your web.config, you will all set. result screen looks like this.
(source: googlecode.com)
You can use ASP.NET Health monitoring.
http://msdn.microsoft.com/en-us/library/ms998306.aspx
Catch any errors that might be thrown and write them to the event log.
EventLog Logger = new EventLog();
Logger.Source = "ApplictionNme";
Logger.WriteEntry("Writing to event log.");

Resources