개정판 1223cf64
DownloadManager 로그 출력 수정
Change-Id: Ifc79b236fd2dc598c83becc18b4ced6dffdf26ae
DownloadManager/Log.config | ||
---|---|---|
11 | 11 |
</layout> |
12 | 12 |
</appender>--> |
13 | 13 |
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> |
14 |
<file type="log4net.Util.PatternString" value="${programdata}\MARKUS\Downloader\Log\"/>
|
|
14 |
<file value="${programdata}\MARKUS\Downloader\Log\{0}.log"/>
|
|
15 | 15 |
<appendtofile value="true"/> |
16 |
<datepattern value="'Markus_'yyyy-MM-dd'.log'"/> |
|
17 |
<staticlogfilename value="false"/> |
|
18 |
<rollingstyle value="Date"/> |
|
19 |
<layout type="log4net.Layout.PatternLayout"> |
|
20 |
<conversionpattern value="%d [%t] %-5p - %m%n"/> |
|
21 |
</layout> |
|
16 |
<maxSizeRollBackups value="10" /> |
|
17 |
<maximumFileSize value="10485760" /> |
|
18 |
<rollingStyle value="Size" /> |
|
19 |
<staticlogfilename value="true"/> |
|
20 |
<layout type="log4net.Layout.PatternLayout"> |
|
21 |
<header value="[Header]"/> |
|
22 |
<footer value="[Footer] "/> |
|
23 |
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" /> |
|
24 |
</layout> |
|
22 | 25 |
</appender> |
23 | 26 |
<root> |
24 | 27 |
<level value="All" /> |
DownloadManager/Program.cs | ||
---|---|---|
1 | 1 |
|
2 | 2 |
using log4net; |
3 | 3 |
using System; |
4 |
using System.Collections.Generic; |
|
5 | 4 |
using System.Diagnostics; |
6 |
using System.Globalization; |
|
7 | 5 |
using System.Linq; |
8 |
using System.Text; |
|
9 |
using System.Threading.Tasks; |
|
10 | 6 |
|
11 | 7 |
namespace DownloadManager |
12 | 8 |
{ |
... | ... | |
37 | 33 |
// Culture = new CultureInfo("en-US") |
38 | 34 |
// }); |
39 | 35 |
|
40 |
|
|
36 |
private static void ChangeLogFileName(string name) |
|
37 |
{ |
|
38 |
log4net.Repository.ILoggerRepository RootRep; |
|
39 |
RootRep = logger.Logger.Repository;// LogManager.GetRepository(Assembly.GetCallingAssembly()); |
|
40 |
|
|
41 |
if (RootRep?.GetAppenders().Count() > 0) |
|
42 |
{ |
|
43 |
(RootRep.GetAppenders().First() as log4net.Appender.RollingFileAppender).File = string.Format((RootRep.GetAppenders().First() as log4net.Appender.RollingFileAppender).File, name); |
|
44 |
(RootRep.GetAppenders().First() as log4net.Appender.RollingFileAppender).ActivateOptions(); |
|
45 |
} |
|
46 |
} |
|
47 |
|
|
41 | 48 |
static void Main(string[] args) |
42 | 49 |
{ |
43 | 50 |
try |
44 | 51 |
{ |
52 |
ChangeLogFileName($"{DateTime.Now.ToString("yyMMddssmm")}_{args[0]}"); |
|
53 |
|
|
45 | 54 |
logger.Info($"param : {string.Join(",", args)}"); |
46 | 55 |
|
47 | 56 |
if (args.Length > 0) |
KCOM/Extensions/DownloadProcess.cs | ||
---|---|---|
32 | 32 |
WindowStyle = (isDebug) ? ProcessWindowStyle.Normal : ProcessWindowStyle.Hidden, |
33 | 33 |
CreateNoWindow = true, |
34 | 34 |
ErrorDialog = false, |
35 |
Verb = "runas", |
|
36 |
RedirectStandardInput = false, |
|
35 | 37 |
RedirectStandardError = false, |
36 | 38 |
Arguments = $"{IIpc.ProcessTypeDefine.DEFINE_THUMBNAIL} {endpoint} {isDebug} {BaseUri} {localStoragePath} {fileExt} {totalPages}" |
37 | 39 |
}; |
KCOM/Log.config | ||
---|---|---|
13 | 13 |
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> |
14 | 14 |
<file type="log4net.Util.PatternString" value="${programdata}\MARKUS\Log\"/> |
15 | 15 |
<appendtofile value="true"/> |
16 |
<datepattern value="'Markus_'yyyy-MM-dd'.log'"/>
|
|
16 |
<datepattern value="'yyyy-MM-dd'.log'"/> |
|
17 | 17 |
<staticlogfilename value="false"/> |
18 | 18 |
<rollingstyle value="Date"/> |
19 |
<maxSizeRollBackups value="100"/> |
|
20 |
<maximumFileSize value="100MB"/> |
|
19 | 21 |
<layout type="log4net.Layout.PatternLayout"> |
20 | 22 |
<conversionpattern value="%d [%t] %-5p - %m%n"/> |
21 | 23 |
</layout> |
KCOM/Properties/AssemblyInfo.cs | ||
---|---|---|
51 | 51 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 |
52 | 52 |
// 지정되도록 할 수 있습니다. |
53 | 53 |
// [assembly: AssemblyVersion("1.0.*")] |
54 |
[assembly: AssemblyVersion("3.3.1.0")]
|
|
55 |
[assembly: AssemblyFileVersion("3.3.1.0")]
|
|
54 |
[assembly: AssemblyVersion("3.4.1.0")]
|
|
55 |
[assembly: AssemblyFileVersion("3.4.1.0")]
|
|
56 | 56 |
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log.config", Watch = true)] |
MarkusAutoUpdate/SetupWix/Product.wxs | ||
---|---|---|
47 | 47 |
<ComponentRef Id="REG_PROTOCOL_WRITE"/> |
48 | 48 |
<ComponentRef Id="REG_WARNONOPEN_WRITE"/> |
49 | 49 |
</Feature> |
50 |
<Publish Dialog="WelcomeDlg" Control="Next" Event="DoAction" Value="WindowsFeatures" >1</Publish> |
|
50 | 51 |
</Product> |
51 |
|
|
52 | 52 |
<Fragment> |
53 | 53 |
<Directory Id="TARGETDIR" Name="SourceDir"> |
54 | 54 |
<Directory Id="ProgramFiles64Folder"> |
MarkusAutoUpdate/SetupWix/SetupWix.wixproj | ||
---|---|---|
100 | 100 |
<Folder Include="Resources" /> |
101 | 101 |
</ItemGroup> |
102 | 102 |
<ItemGroup> |
103 |
<WixExtension Include="WixUtilExtension"> |
|
104 |
<HintPath>..\packages\WiX.3.11.2\tools\WixUtilExtension.dll</HintPath> |
|
105 |
<Name>WixUtilExtension</Name> |
|
106 |
</WixExtension> |
|
103 | 107 |
<WixExtension Include="WixNetFxExtension"> |
104 | 108 |
<HintPath>..\packages\WiX.3.11.2\tools\WixNetFxExtension.dll</HintPath> |
105 | 109 |
<Name>WixNetFxExtension</Name> |
MarkusAutoUpdate/src/MarkusUpdateExtract_Net/Properties/app.manifest | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> |
|
3 |
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" /> |
|
4 |
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> |
|
5 |
<security> |
|
6 |
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> |
|
7 |
<!-- UAC 매니페스트 옵션 |
|
8 |
Windows 사용자 계정 컨트롤 수준을 변경하려면 |
|
9 |
requestedExecutionLevel 노드를 다음 중 하나로 바꿉니다. |
|
10 |
|
|
11 |
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> |
|
12 |
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> |
|
13 |
<requestedExecutionLevel level="highestAvailable" uiAccess="false" /> |
|
14 |
|
|
15 |
requestedExecutionLevel 요소를 지정하면 파일 및 레지스트리 가상화를 사용하지 않습니다. |
|
16 |
이전 버전과의 호환성을 위해 애플리케이션에 가상화가 필요한 경우 |
|
17 |
이 요소를 제거합니다. |
|
18 |
--> |
|
19 |
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> |
|
20 |
</requestedPrivileges> |
|
21 |
<applicationRequestMinimum> |
|
22 |
<defaultAssemblyRequest permissionSetReference="Custom" /> |
|
23 |
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" /> |
|
24 |
</applicationRequestMinimum> |
|
25 |
</security> |
|
26 |
</trustInfo> |
|
27 |
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> |
|
28 |
<application> |
|
29 |
<!-- 이 애플리케이션이 테스트되고 함께 작동하도록 설계된 Windows 버전 |
|
30 |
목록입니다. 해당 요소의 주석 처리를 제거하면 Windows에서 |
|
31 |
호환 가능성이 가장 큰 환경을 자동으로 선택합니다. --> |
|
32 |
<!-- Windows Vista --> |
|
33 |
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />--> |
|
34 |
<!-- Windows 7 --> |
|
35 |
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />--> |
|
36 |
<!-- Windows 8 --> |
|
37 |
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />--> |
|
38 |
<!-- Windows 8.1 --> |
|
39 |
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />--> |
|
40 |
<!-- Windows 10 --> |
|
41 |
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />--> |
|
42 |
</application> |
|
43 |
</compatibility> |
|
44 |
<!-- 애플리케이션에서 DPI를 인식하며 높은 DPI에서는 Windows가 자동으로 크기를 조정하지 |
|
45 |
않습니다. WPF(Windows Presentation Foundation) 애플리케이션은 자동으로 DPI를 인식하며 |
|
46 |
옵트인할 필요가 없습니다. 이 설정으로 옵트인하며 .NET Framework 4.6을 대상으로 하는 |
|
47 |
Windows Forms 애플리케이션은 app.config에서 'EnableWindowsFormsHighDpiAutoResizing' 설정도 'true'로 지정합니다. --> |
|
48 |
<!-- |
|
49 |
<application xmlns="urn:schemas-microsoft-com:asm.v3"> |
|
50 |
<windowsSettings> |
|
51 |
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware> |
|
52 |
</windowsSettings> |
|
53 |
</application> |
|
54 |
--> |
|
55 |
<!-- Windows 공용 컨트롤 및 대화 상자의 테마 사용(Windows XP 이상) --> |
|
56 |
<!-- |
|
57 |
<dependency> |
|
58 |
<dependentAssembly> |
|
59 |
<assemblyIdentity |
|
60 |
type="win32" |
|
61 |
name="Microsoft.Windows.Common-Controls" |
|
62 |
version="6.0.0.0" |
|
63 |
processorArchitecture="*" |
|
64 |
publicKeyToken="6595b64144ccf1df" |
|
65 |
language="*" |
|
66 |
/> |
|
67 |
</dependentAssembly> |
|
68 |
</dependency> |
|
69 |
--> |
|
70 |
</assembly> |
내보내기 Unified diff