[expo-updates] Add code signing logging (#19589)
[expo-updates] Add log lines for the error scenarios we want to track (#18810)
Persistent logging for expo-updates (#18513)iOS: - PersistentFileLog (class to write logs to a flat file) - New PersistentLogHandler in LogHandler.swift - OptionSet in Logger to use the new hand
Persistent logging for expo-updates (#18513)iOS: - PersistentFileLog (class to write logs to a flat file) - New PersistentLogHandler in LogHandler.swift - OptionSet in Logger to use the new handler (and support for future additions) - Modify UpdatesLogger and UpdatesLogReader to use the above in place of OSLogReader - Modify EXUpdatesModule to implement clearing the log file - Unit tests for the above - Modify EXUpdatesAppController to automatically purge old log entries on start Android: - New Logger and associated classes in expo-modules-core, same structure as iOS - PersistentFileLog (class to write logs to a flat file) - Options class LoggerOptions to use the new handler (and support for future additions) - Modify UpdatesLogger and UpdatesLogReader to use the above in place of Android OS logging - Modify UpdatesModule to implement clearing the log file - Unit tests for the above - Modify UpdatesController to automatically purge old log entries on start
show more ...
[expo-updates] JS access to client log entries (#18390)Why Once we have client-side logging in expo-updates, we need a way to expose it in JS so that developers can take log information and view
[expo-updates] JS access to client log entries (#18390)Why Once we have client-side logging in expo-updates, we need a way to expose it in JS so that developers can take log information and view it or send it to their own logging services. How New methods have been defined in the `Updates` module, and implemented in both the iOS and Android `Updates` native modules. ```ts /** * Retrieves the most recent expo-updates log entries from the client. * * @param maxAge Sets the max age of retrieved log entries in milliseconds. Default to 3600000 ms (1 hour). * * @return A promise that fulfills with an array of [`UpdatesLogEntry`](#updateslogentry) objects; * * The promise rejects if there is an unexpected error in retrieving the logs. */ Updates.readLogEntriesAsync(maxAge?: number): Promise<UpdatesLogEntry[]>; /** * Clears existing expo-updates logs from the client. * * @return A promise that fulfills if the clear operation was successful. * * The promise rejects if there is an unexpected error in clearing the logs. * */ Updates.clearLogEntriesAsync(): Promise<void>; /** * An object representing a single log entry from expo-updates logging on the client. */ type UpdatesLogEntry = { timestamp: number; // ms since 1/1/1970 UTC message: string; code: UpdatesLogEntryCode; level: string; // fatal, error, warn, info, debug, trace updateId?: string; assetId?: string; stacktrace?: string[]; }; enum UpdatesLogEntryCode { None = 'None', NoUpdatesAvailable = 'NoUpdatesAvailable', UpdateAssetsNotAvailable = 'UpdateAssetsNotAvailable', UpdateServerUnreachable = 'UpdateServerUnreachable', UpdateHasInvalidSignature = 'UpdateHasInvalidSignature', UpdateFailedToLoad = 'UpdateFailedToLoad', AssetsFailedToLoad = 'AssetsFailedToLoad', JSRuntimeError = 'JSRuntimeError' } ``` Test Plan A few log lines have been added on both iOS and Android so that logs will be generated for retrieval, and a sample app was used to verify functionality of the new methods. There are also new Jest tests in `Updates-test.ios.ts`.
[expo-updates][Android] Logging and log reading (#18318)