officescripts-logging-framework
    Preparing search index...

    Class Utility

    Utility class providing static helper methods for logging operations.

    Index

    Constructors

    Methods

    • Helper method to format the local date as a string. Output in standard format: YYYY-MM-DD HH:mm:ss,SSS. where SSS is the milliseconds part padded to 3 digits.

      Parameters

      • date: Date

        The date to format.

      Returns string

      A string representation of the date in the format YYYY-MM-DD HH:mm:ss,SSS.

    • Helper method to check for an empty array.

      Type Parameters

      • T

      Parameters

      • arr: T[]

      Returns boolean

    • Validates a log event factory is a function.

      Parameters

      • factory: unknown

        The factory function to validate.

      • OptionalfunName: string

        Used to identify the function name in the error message.

      • Optionalcontext: string

      Returns void

      ScriptError if the log event factory is not a function.

      Identical method already defined in AbstractAppender just keep it here in case in the future it can be used by other classes that need to validate a log event factory. At this time is not used but the test cases where defined for this class in test/main.ts so we keep it for potential future use.