mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 01:36:31 +02:00
Color picker logs path (#10375)
This commit is contained in:
@@ -135,6 +135,12 @@ public
|
|||||||
public:
|
public:
|
||||||
literal int VK_WIN_BOTH = CommonSharedConstants::VK_WIN_BOTH;
|
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() {
|
static String ^ PowerLauncherSharedEvent() {
|
||||||
return gcnew String(CommonSharedConstants::POWER_LAUNCHER_SHARED_EVENT);
|
return gcnew String(CommonSharedConstants::POWER_LAUNCHER_SHARED_EVENT);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace CommonSharedConstants
|
|||||||
// Fake key code to represent VK_WIN.
|
// Fake key code to represent VK_WIN.
|
||||||
inline const int VK_WIN_BOTH = 0x104;
|
inline const int VK_WIN_BOTH = 0x104;
|
||||||
|
|
||||||
|
const wchar_t APPDATA_PATH[] = L"Microsoft\\PowerToys";
|
||||||
|
|
||||||
// Path to the event used by PowerLauncher
|
// Path to the event used by PowerLauncher
|
||||||
const wchar_t POWER_LAUNCHER_SHARED_EVENT[] = L"Local\\PowerToysRunInvokeEvent-30f26ad7-d36d-4c0e-ab02-68bb5ff3c4ab";
|
const wchar_t POWER_LAUNCHER_SHARED_EVENT[] = L"Local\\PowerToysRunInvokeEvent-30f26ad7-d36d-4c0e-ab02-68bb5ff3c4ab";
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
|
using interop;
|
||||||
|
|
||||||
namespace ColorPicker.Helpers
|
namespace ColorPicker.Helpers
|
||||||
{
|
{
|
||||||
public static class Logger
|
public static class Logger
|
||||||
{
|
{
|
||||||
private static readonly IFileSystem _fileSystem = new FileSystem();
|
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()
|
static Logger()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user