public TabadminLogEvent(BsonDocument document, IEnumerable <TableauServerVersion> versionTimeline) : base(document) { Timestamp = document.GetDateTime("ts"); TimestampOffset = document.GetString("ts_offset"); TimestampGmt = (DateTime)DateTimeConversionHelper.ConvertDateTime(Timestamp, TimestampOffset); Hostname = document.GetString("hostname"); ServerVersion = GetVersionByDate(versionTimeline); }
public TableauServerVersion(BsonDocument document) : base(document) { Match match = versionRegex.Match(BsonDocumentHelper.GetString("message", document)); Version = match.Groups["shortVersion"].Value; VersionLong = match.Groups["longVersion"].Value; StartDate = document.GetDateTime("ts"); TimestampOffset = document.GetString("ts_offset"); StartDateGmt = (DateTime)DateTimeConversionHelper.ConvertDateTime(StartDate, TimestampOffset); EndDateGmt = DateTimeConversionHelper.ConvertDateTime(EndDate, TimestampOffset); }
public TabadminLoggedItem(BsonDocument logLine, Guid logsetHash) { LogsetHash = logsetHash; Timestamp = BsonDocumentHelper.GetDateTime("ts", logLine); TimestampOffset = BsonDocumentHelper.GetString("ts_offset", logLine); TimestampGmt = (DateTime)DateTimeConversionHelper.ConvertDateTime(Timestamp, TimestampOffset); Worker = BsonDocumentHelper.GetString("worker", logLine); Hostname = BsonDocumentHelper.GetString("hostname", logLine); File = BsonDocumentHelper.GetString("file", logLine); FilePath = BsonDocumentHelper.GetString("file_path", logLine); Line = BsonDocumentHelper.GetInt("line", logLine); EventHash = HashHelper.GenerateHashGuid(Timestamp, TimestampOffset, Worker, Hostname, File, FilePath, Line); }
public TSVersion(BsonDocument logLine, Guid logsetHash) { LogsetHash = logsetHash; Match match = versionRegex.Match(BsonDocumentHelper.GetString("message", logLine)); VersionStringShort = match.Groups["shortVersion"].Value; VersionStringLong = match.Groups["longVersion"].Value; StartDate = BsonDocumentHelper.GetDateTime("ts", logLine); TimestampOffset = BsonDocumentHelper.GetString("ts_offset", logLine); StartDateGmt = (DateTime)DateTimeConversionHelper.ConvertDateTime(StartDate, TimestampOffset); EndDateGmt = DateTimeConversionHelper.ConvertDateTime(EndDate, TimestampOffset); Worker = BsonDocumentHelper.GetString("worker", logLine); File = BsonDocumentHelper.GetString("file", logLine); FilePath = BsonDocumentHelper.GetString("file_path", logLine); Line = BsonDocumentHelper.GetInt("line", logLine); EventHash = HashHelper.GenerateHashGuid(StartDate, TimestampOffset, VersionStringLong, Worker, File, FilePath, Line); }