Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9c060cd0d |
@@ -5,7 +5,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Amazon;
|
|
||||||
|
|
||||||
namespace CloudWatchLogDownloader
|
namespace CloudWatchLogDownloader
|
||||||
{
|
{
|
||||||
@@ -102,10 +101,19 @@ namespace CloudWatchLogDownloader
|
|||||||
|
|
||||||
private static void WriteLogToFile(LogGroup logGroup, LogStream logStream, bool liveStream, string outputFilePath = null)
|
private static void WriteLogToFile(LogGroup logGroup, LogStream logStream, bool liveStream, string outputFilePath = null)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Choose Output file [logs/" + logStream.LogStreamName + ".log]: ");
|
string output = null;
|
||||||
var output = Console.ReadLine();
|
if (string.IsNullOrWhiteSpace(outputFilePath))
|
||||||
if (string.IsNullOrWhiteSpace(output))
|
{
|
||||||
output = "logs/" + logStream.LogStreamName + ".log";
|
Console.WriteLine("Choose Output file [logs/" + logStream.LogStreamName + ".log]: ");
|
||||||
|
output = Console.ReadLine();
|
||||||
|
if (string.IsNullOrWhiteSpace(output))
|
||||||
|
output = "logs/" + logStream.LogStreamName + ".log";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
output = outputFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Directory.GetParent(output).Exists)
|
if (!Directory.GetParent(output).Exists)
|
||||||
Directory.CreateDirectory(Directory.GetParent(output).FullName);
|
Directory.CreateDirectory(Directory.GetParent(output).FullName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user