AdminUI outputs to the console by default, which most hosting options can read from.
Logging with IIS
Setting the 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 stdoutLogFile
attribute.
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 stdout
:
<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 AdminUI is to:
- Set the
AzureAppServiceLogging
application setting to true. - Enable
Application Logging (filesystem)
in the App Service Logs section of the Azure portal:
This will automatically set the log location of AdminUI to Home\LogFiles\Application\Admin
in the app service. Using this option will allow you to see logs from the Log stream
page in the Azure portal.
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.UI.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\AdminUI" ...>
In your AdminUI web app, go to "Advanced Tools" and click on "Go".
Now click on "Debug console" and select "Powershell".
Leave it a second to load and then navigate to this file:
site\wwwroot\web.config
Change the "stdoutLogEnabled" value to "true" and save:
(You can also modify the where log files on “stdoutLogFile”)
Now if you restart your web app and navigate back to the home folder and then to "Logfiles" you should fine log files named something similar to "stdout_34872356554.log"
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 will now output logs under the LogFiles\Application directory at the root of your app service.
Logging with Docker
Docker should automatically record any 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 will only log Warning
level database commands. To change this, update the EFLoggingMinimumLevel
variable in the AdminUI config.