Color picker logs path (#10375)
This commit is contained in:
parent
77d67f3599
commit
acbabbe13d
|
@ -135,6 +135,12 @@ public
|
|||
public:
|
||||
literal int VK_WIN_BOTH = CommonSharedConstants::VK_WIN_BOTH;
|
||||
|
||||
static String ^ AppDataPath() {
|
||||
auto localPath = Environment::GetFolderPath(Environment::SpecialFolder::LocalApplicationData);
|
||||
auto powerToysPath = gcnew String(CommonSharedConstants::APPDATA_PATH);
|
||||
return System::IO::Path::Combine(localPath, powerToysPath);
|
||||
}
|
||||
|
||||
static String ^ PowerLauncherSharedEvent() {
|
||||
return gcnew String(CommonSharedConstants::POWER_LAUNCHER_SHARED_EVENT);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace CommonSharedConstants
|
|||
// Fake key code to represent VK_WIN.
|
||||
inline const int VK_WIN_BOTH = 0x104;
|
||||
|
||||
const wchar_t APPDATA_PATH[] = L"Microsoft\\PowerToys";
|
||||
|
||||
// Path to the event used by PowerLauncher
|
||||
const wchar_t POWER_LAUNCHER_SHARED_EVENT[] = L"Local\\PowerToysRunInvokeEvent-30f26ad7-d36d-4c0e-ab02-68bb5ff3c4ab";
|
||||
|
||||
|
|
|
@ -5,14 +5,16 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using interop;
|
||||
|
||||
namespace ColorPicker.Helpers
|
||||
{
|
||||
public static class Logger
|
||||
{
|
||||
private static readonly IFileSystem _fileSystem = new FileSystem();
|
||||
private static readonly string ApplicationLogPath = _fileSystem.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ColorPicker");
|
||||
private static readonly string ApplicationLogPath = Path.Combine(Constants.AppDataPath(), "ColorPicker\\Logs");
|
||||
|
||||
static Logger()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue