Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 953 Bytes

serverlog.md

File metadata and controls

27 lines (18 loc) · 953 Bytes

Server Log File

Writing to the server log

AbpServiceBase (which is inherited by AppService and DomainService) contains a property called Logger which can be used to write to the server logs (normally found in .Web.Host\App_Data\Logs\Logs.txt).

Call Logger.Debug() (or which ever level of verbosity you require i.e. Info, Debug, Warning, Error or Fatal) to log a message to the logfile.

    public void DoSomething()
    {
        Logger.Debug("Something happened");
    }

Accessing the server log from Azure

The server log can be accessed directly in the browser from the following URL:

https://<server>.scm.azurewebsites.net/api/vfs/site/wwwroot/App_Data/Logs/Logs.txt

Substitute <server> for your web app name.

See Also