The best location to enable logging for AdminUI is in the API site. The application outputs to the console by default, which most hosting options can read from.
Logging with IIS
stdoutLogEnabled attribute to
true in the
web.config or IIS configuration manager enables logging. This attribute is found in:
system.webServer > aspNetCore.
The log file output location is controlled by the
In the example below, logging has been enabled in the
web.config and all log files will be output to the
.\logs\ directory. The log files will also be prefixed with
<aspNetCore stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" ...> ... </aspNetCore>
Note: Ensure that the folder exists and that IIS has permissions to write to it.
Logging with Azure
Our recommended way to get logs out of both the UI and the API is to:
- Set the
AzureAppServiceLoggingapplication setting to true.
Application Logging (filesystem)in the App Service Logs section of the Azure portal:
This will automatically set the log location of the UI and API to
Home\LogFiles\Application\Admin in their respective app services. Using this option will allow you to see logs from the
Log stream page in the Azure portal.
The caveat is if stdout is set to true in the web.config it could potentially produce logs in 2 places.
To solve this you can set stdoutLogEnabled to false in the web.config.
If you are having trouble getting logs out of your Azure installation by using the setting above then you can change the web.config. To get logs out in this scenario you can change the stdoutLogFile to a location in the log files directory. This should look something like the following:
<aspNetCore processPath=".\IdentityExpress.Manager.Api.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\AdminAPI" ...>
Alternatively if you deploy AdminUI as part of your CI/CD process as of 4.2.0 and 5.1.0 we supply an xml transform file that does the above for you on deployment. The caveat is that you wont see these logs in the Log Stream section of Azure.
AdminUI API will now output logs under the LogFiles\Application directory at the root of your app service.
Logging with Docker
Docker should automatically record any UI and API logs with Docker logging. Most tools and systems that work with Docker logging will continue to work as expected.
Minimum Entity Framework Logging Level
By default, the AdminUI API will only log
Warning level database commands. To change this, update the
EFLoggingMinimumLevel variable in the AdminUI API config.