From 3b117d784744a522cbd0cbf230bddb48b26486e1 Mon Sep 17 00:00:00 2001 From: YPermitin Date: Mon, 30 Nov 2020 02:02:29 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA?= =?UTF-8?q?=D0=B0=20=D1=87=D0=B0=D1=81=D0=BE=D0=B2=D1=8B=D1=85=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=8F=D1=81=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Настройка часового пояса, где расположены файлы логов - Обновлена версия пакетов --- ...YY.EventLogExportAssistant.ClickHouse.csproj | 4 ++-- .../EventLogExportMaster.cs | 17 +++++++++++++++-- .../IEventLogExportMaster.cs | 5 ++++- .../YY.EventLogExportAssistant.Core.csproj | 6 +++--- ...EventLogExportAssistant.ElasticSearch.csproj | 4 ++-- .../YY.EventLogExportAssistant.MySQL.csproj | 4 ++-- ...YY.EventLogExportAssistant.PostgreSQL.csproj | 6 +++--- .../YY.EventLogExportAssistant.SQLServer.csproj | 6 +++--- 8 files changed, 34 insertions(+), 18 deletions(-) diff --git a/Libs/YY.EventLogExportAssistant.ClickHouse/YY.EventLogExportAssistant.ClickHouse.csproj b/Libs/YY.EventLogExportAssistant.ClickHouse/YY.EventLogExportAssistant.ClickHouse.csproj index 9e99464..db9a489 100644 --- a/Libs/YY.EventLogExportAssistant.ClickHouse/YY.EventLogExportAssistant.ClickHouse.csproj +++ b/Libs/YY.EventLogExportAssistant.ClickHouse/YY.EventLogExportAssistant.ClickHouse.csproj @@ -3,7 +3,7 @@ netstandard2.1 true - 1.0.0.5 + 1.0.0.6 Permitin Yuriy Permitin Yuriy Event log export assistant to ClickHouse @@ -15,7 +15,7 @@ GIT event, log, 1C, enterprise, export, elasticsearch, elk Just beginning... - 1.0.0.5 + 1.0.0.6 diff --git a/Libs/YY.EventLogExportAssistant.Core/EventLogExportMaster.cs b/Libs/YY.EventLogExportAssistant.Core/EventLogExportMaster.cs index 890840f..7c760f6 100644 --- a/Libs/YY.EventLogExportAssistant.Core/EventLogExportMaster.cs +++ b/Libs/YY.EventLogExportAssistant.Core/EventLogExportMaster.cs @@ -17,6 +17,7 @@ namespace YY.EventLogExportAssistant private EventLogReader _reader; private readonly List _dataToSend; private int _portionSize; + private TimeZoneInfo _logTimeZoneInfo; public delegate void BeforeExportDataHandler(BeforeExportDataEventArgs e); public event BeforeExportDataHandler BeforeExportData; @@ -34,17 +35,25 @@ namespace YY.EventLogExportAssistant _referenceDataHash = string.Empty; _dataToSend = new List(); _portionSize = 0; + _logTimeZoneInfo = TimeZoneInfo.Local; } #endregion #region Public Methods - public void SetEventLogPath(string eventLogPath) + public void SetEventLogPath(string eventLogPath, TimeZoneInfo timeZone) { _eventLogPath = eventLogPath; - if(!string.IsNullOrEmpty(_eventLogPath)) + if (!string.IsNullOrEmpty(_eventLogPath)) + { _reader = EventLogReader.CreateReader(_eventLogPath); + _reader.SetTimeZone(timeZone); + } + } + public void SetEventLogPath(string eventLogPath) + { + SetEventLogPath(eventLogPath, TimeZoneInfo.Local); } public void SetTarget(IEventLogOnTarget target) { @@ -113,6 +122,10 @@ namespace YY.EventLogExportAssistant if (_dataToSend.Count > 0) SendDataCurrentPortion(_reader); } + public TimeZoneInfo GetTimeZone() + { + return _logTimeZoneInfo; + } public void Dispose() { if (_reader != null) diff --git a/Libs/YY.EventLogExportAssistant.Core/IEventLogExportMaster.cs b/Libs/YY.EventLogExportAssistant.Core/IEventLogExportMaster.cs index b16bc95..67b9680 100644 --- a/Libs/YY.EventLogExportAssistant.Core/IEventLogExportMaster.cs +++ b/Libs/YY.EventLogExportAssistant.Core/IEventLogExportMaster.cs @@ -1,4 +1,6 @@ -namespace YY.EventLogExportAssistant +using System; + +namespace YY.EventLogExportAssistant { public interface IEventLogExportMaster { @@ -6,5 +8,6 @@ void SetTarget(IEventLogOnTarget target); bool NewDataAvailable(); void SendData(); + TimeZoneInfo GetTimeZone(); } } diff --git a/Libs/YY.EventLogExportAssistant.Core/YY.EventLogExportAssistant.Core.csproj b/Libs/YY.EventLogExportAssistant.Core/YY.EventLogExportAssistant.Core.csproj index 216e49e..df08cdf 100644 --- a/Libs/YY.EventLogExportAssistant.Core/YY.EventLogExportAssistant.Core.csproj +++ b/Libs/YY.EventLogExportAssistant.Core/YY.EventLogExportAssistant.Core.csproj @@ -3,7 +3,7 @@ netstandard2.1 YY.EventLogExportAssistant - 1.0.0.35 + 1.0.0.36 YY.EventLogExportAssistant.Core Permitin Yuriy @@ -17,7 +17,7 @@ https://github.com/YPermitin/YY.EventLogExportAssistant GIT event, log, 1C, enterprise, export - 1.0.0.35 + 1.0.0.36 Just beginning... MIT @@ -27,7 +27,7 @@ - + diff --git a/Libs/YY.EventLogExportAssistant.ElasticSearch/YY.EventLogExportAssistant.ElasticSearch.csproj b/Libs/YY.EventLogExportAssistant.ElasticSearch/YY.EventLogExportAssistant.ElasticSearch.csproj index 37d6904..08bb6d9 100644 --- a/Libs/YY.EventLogExportAssistant.ElasticSearch/YY.EventLogExportAssistant.ElasticSearch.csproj +++ b/Libs/YY.EventLogExportAssistant.ElasticSearch/YY.EventLogExportAssistant.ElasticSearch.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 1.0.0.17 + 1.0.0.18 Permitin Yuriy Permitin Yuriy Event log export assistant to ElasticSearch @@ -15,7 +15,7 @@ event, log, 1C, enterprise, export, elasticsearch, elk Just beginning... true - 1.0.0.17 + 1.0.0.18 diff --git a/Libs/YY.EventLogExportAssistant.MySQL/YY.EventLogExportAssistant.MySQL.csproj b/Libs/YY.EventLogExportAssistant.MySQL/YY.EventLogExportAssistant.MySQL.csproj index 7427252..7eabf12 100644 --- a/Libs/YY.EventLogExportAssistant.MySQL/YY.EventLogExportAssistant.MySQL.csproj +++ b/Libs/YY.EventLogExportAssistant.MySQL/YY.EventLogExportAssistant.MySQL.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 1.0.0.14 + 1.0.0.15 Permitin Yuriy Event log export assistant for MySQL Library for exprorting 1C:Enterprise 8.x platform's event log files to MySQL database @@ -14,7 +14,7 @@ Just beginning... icon.png true - 1.0.0.14 + 1.0.0.15 diff --git a/Libs/YY.EventLogExportAssistant.PostgreSQL/YY.EventLogExportAssistant.PostgreSQL.csproj b/Libs/YY.EventLogExportAssistant.PostgreSQL/YY.EventLogExportAssistant.PostgreSQL.csproj index fde481d..770bd4a 100644 --- a/Libs/YY.EventLogExportAssistant.PostgreSQL/YY.EventLogExportAssistant.PostgreSQL.csproj +++ b/Libs/YY.EventLogExportAssistant.PostgreSQL/YY.EventLogExportAssistant.PostgreSQL.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 1.0.0.35 + 1.0.0.36 YY.EventLogExportAssistant.PostgreSQL Permitin Yuriy Event log export assistant for PostgreSQL @@ -14,9 +14,9 @@ GIT event, log, 1C, enterprise, export, postgres, postgresql true - 1.0.0.35 + 1.0.0.36 Just beginning... - 1.0.0.35 + 1.0.0.36 diff --git a/Libs/YY.EventLogExportAssistant.SQLServer/YY.EventLogExportAssistant.SQLServer.csproj b/Libs/YY.EventLogExportAssistant.SQLServer/YY.EventLogExportAssistant.SQLServer.csproj index 1a6c20c..71ff9d3 100644 --- a/Libs/YY.EventLogExportAssistant.SQLServer/YY.EventLogExportAssistant.SQLServer.csproj +++ b/Libs/YY.EventLogExportAssistant.SQLServer/YY.EventLogExportAssistant.SQLServer.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 1.0.0.35 + 1.0.0.36 YY.EventLogExportAssistant.SQLServer Permitin Yuriy @@ -15,8 +15,8 @@ https://github.com/YPermitin/YY.EventLogExportAssistant GIT event, log, 1C, enterprise, export, sqlserver - 1.0.0.35 - 1.0.0.35 + 1.0.0.36 + 1.0.0.36 Just beginning...