How to Clear Log Files in Bulk

Follow
    Applies to:
  • Legacy SecureAuth IdP
Deployment model:
  • On Premises
  • SecureAuth version affected: All

    Description: Text log files, for each SecureAuth realm, operate on toggle switch. By default, Error logging is always enabled, but Audit and Debug logging can be enabled or disabled. This is determined by the Text checkbox found under the realm's Logs tab, through the Admin Console.




    If Text logging is enabled, SecureAuth will document login data of every login attempt in the form of text files found within the realm's file directory--with the exception of the Error log which only writes log data when a realm encounters an error:
    D:\Secureauth\SecureAuth#\AuditLogs
    D:\Secureauth\SecureAuth#\debuglogs
    D:\Secureauth\SecureAuth#\ErrorLog

    Once enabled, logging will remain enabled until disabled. Because of this, log files can pile up quick and take up a lot of hard drive space. These files can be selected and cleared in bulk by doing the following.


    - On the SecureAuth IdP server, open File Explorer and direct to the following directory: D:\Secureauth

    - In the search bar, in the top left corner of the window, search for one of the following wild card strings:
    Audit.20*.log: searches the current file directory for all Audit log files dated to a 20XX year.
    Debug.20*.log: searches the current file directory for all Debug log files dated to a 20XX year.
    Warning.20*.log: searches the current file directory for all Error log files dated to a 20XX year.
    *20*.log: searches the current file directory for all log files--Audit, Debug, and Error--dated to a 20XX year.

    These wild card search strings will exclude the most current Audit, Debug, and Error log files on the server. To remove these files as well, remove the *20* prefix to any search string. Back logged files are saved with the following naming format Type.YYYY-MM-DD.Log.

    - Once the search completes, Ctrl+A can be used to select all files.
    - Press the Delete keyboard key, or right-click and select Delete, to remove all found log files from the IdP server.

     

    Special Considerations:  

    This article is superseded by:

    https://support.secureauth.com/hc/en-us/articles/4402711906452-How-to-Clear-Log-Files-in-Bulk-older-than-X-days

     

     

    Related Articles:

    https://support.secureauth.com/hc/en-us/articles/360027918591-Log-file-rollover-and-retention-configuration

     

    https://support.secureauth.com/hc/en-us/articles/360041395431-What-logs-files-can-be-cleaned-from-a-SecureAuth-IdP-server-

     

     

     

    SecureAuth Knowledge Base Articles provide information based on specific use cases and may not apply to all appliances or configurations. Be advised that these instructions could cause harm to the environment if not followed correctly or if they do not apply to the current use case.

    Customers are responsible for their own due diligence prior to utilizing this information and agree that SecureAuth is not liable for any issues caused by misconfiguration directly or indirectly related to SecureAuth products.

     

    0 out of 0 found this helpful

    Comments

    1 comment
    • A quick and easy route through Powershell:

      PS D:\> Get-childitem * -include *.log -recurse | remove-item -force

      2
      Comment actions Permalink

    Please sign in to leave a comment.