コード例 #1
0
        private async Task LogExceptionInternalAsync(String comment, Exception exception)
        {
            try
            {
                var logFileStream = await GetLogFileStreamTask.Value.ConfigureAwait(false);

                var message = (comment != null) ? $"{comment}\n\n" : "";
                message += exception.AsDebugMessage();
                await AppendTextAsync(logFileStream, $"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} - {message}\n").ConfigureAwait(false);
            }
            catch (Exception)
            {
            }
        }