[{"data":1,"prerenderedAt":658},["ShallowReactive",2],{"content-en-migration":3},{"doc":4,"debug":655},{"id":5,"title":6,"body":7,"description":648,"extension":649,"meta":650,"navigation":404,"path":651,"seo":652,"stem":653,"__hash__":654},"content\u002Fen\u002Fmigration.md","Migration Guide",{"type":8,"value":9,"toc":629},"minimark",[10,24,53,66,69,74,81,104,107,142,150,153,168,183,188,192,203,256,260,265,268,293,299,320,323,335,338,353,360,369,377,380,438,442,445,474,481,489,504,508,511,594,598,607,614,618,625],[11,12,14,15,19,20,23],"h1",{"id":13},"migration-guide-ozakboynlog-v2x-ozalog-v30","Migration Guide — ",[16,17,18],"code",{},"Ozakboy.NLOG"," v2.x → ",[16,21,22],{},"OzaLog"," v3.0",[25,26,27],"blockquote",{},[28,29,30,34,35,37,38,47,48,52],"p",{},[31,32,33],"strong",{},"Why the rename?"," ",[16,36,18],{}," and the well-known ",[39,40,44],"a",{"href":41,"rel":42},"https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FNLog",[43],"nofollow",[16,45,46],{},"NLog"," package have nothing to do with each other. The naming similarity caused user confusion. Starting v3.0 the package is renamed to ",[31,49,50],{},[16,51,22],{}," to avoid this and to mark a clean break for the v3.0 architectural rewrite.",[25,54,55],{},[28,56,57,62,63,65],{},[31,58,59,61],{},[16,60,18],{}," v2.1.0 is now deprecated"," and will not receive further updates. All future development happens on ",[16,64,22],{},".",[67,68],"hr",{},[70,71,73],"h2",{"id":72},"_1-update-the-nuget-packagereference","1. Update the NuGet PackageReference",[28,75,76,77,80],{},"In your ",[16,78,79],{},".csproj",":",[82,83,88],"pre",{"className":84,"code":85,"language":86,"meta":87,"style":87},"language-diff shiki shiki-themes github-light","- \u003CPackageReference Include=\"Ozakboy.NLOG\" Version=\"2.1.0\" \u002F>\n+ \u003CPackageReference Include=\"OzaLog\" Version=\"3.0.0\" \u002F>\n","diff","",[16,89,90,98],{"__ignoreMap":87},[91,92,95],"span",{"class":93,"line":94},"line",1,[91,96,97],{},"- \u003CPackageReference Include=\"Ozakboy.NLOG\" Version=\"2.1.0\" \u002F>\n",[91,99,101],{"class":93,"line":100},2,[91,102,103],{},"+ \u003CPackageReference Include=\"OzaLog\" Version=\"3.0.0\" \u002F>\n",[28,105,106],{},"Or via CLI:",[82,108,112],{"className":109,"code":110,"language":111,"meta":87,"style":87},"language-bash shiki shiki-themes github-light","dotnet remove package Ozakboy.NLOG\ndotnet add package OzaLog\n","bash",[16,113,114,130],{"__ignoreMap":87},[91,115,116,120,124,127],{"class":93,"line":94},[91,117,119],{"class":118},"s7eDp","dotnet",[91,121,123],{"class":122},"sYBdl"," remove",[91,125,126],{"class":122}," package",[91,128,129],{"class":122}," Ozakboy.NLOG\n",[91,131,132,134,137,139],{"class":93,"line":100},[91,133,119],{"class":118},[91,135,136],{"class":122}," add",[91,138,126],{"class":122},[91,140,141],{"class":122}," OzaLog\n",[70,143,145,146,149],{"id":144},"_2-update-using-statements","2. Update ",[16,147,148],{},"using"," statements",[28,151,152],{},"Across your codebase replace:",[82,154,156],{"className":84,"code":155,"language":86,"meta":87,"style":87},"- using ozakboy.NLOG;\n+ using OzaLog;\n",[16,157,158,163],{"__ignoreMap":87},[91,159,160],{"class":93,"line":94},[91,161,162],{},"- using ozakboy.NLOG;\n",[91,164,165],{"class":93,"line":100},[91,166,167],{},"+ using OzaLog;\n",[82,169,171],{"className":84,"code":170,"language":86,"meta":87,"style":87},"- using ozakboy.NLOG.Core;\n+ using OzaLog.Core;\n",[16,172,173,178],{"__ignoreMap":87},[91,174,175],{"class":93,"line":94},[91,176,177],{},"- using ozakboy.NLOG.Core;\n",[91,179,180],{"class":93,"line":100},[91,181,182],{},"+ using OzaLog.Core;\n",[25,184,185],{},[28,186,187],{},"Tip: a single project-wide find-and-replace handles this. The two patterns above cover all references.",[70,189,191],{"id":190},"_3-the-api-surface-is-unchanged","3. The API surface is unchanged",[28,193,194,195,198,199,202],{},"You do ",[31,196,197],{},"not"," need to change any ",[16,200,201],{},"LOG.*_Log(...)"," calls. All public method signatures are preserved:",[82,204,208],{"className":205,"code":206,"language":207,"meta":87,"style":87},"language-csharp shiki shiki-themes github-light","LOG.Trace_Log(\"...\");\nLOG.Debug_Log(\"...\");\nLOG.Info_Log(\"...\");\nLOG.Warn_Log(\"...\");\nLOG.Error_Log(\"...\");\nLOG.Fatal_Log(\"...\");\nLOG.CustomName_Log(\"BTC\", \"...\");\nLOG.Configure(o => { ... });\n","csharp",[16,209,210,215,220,226,232,238,244,250],{"__ignoreMap":87},[91,211,212],{"class":93,"line":94},[91,213,214],{},"LOG.Trace_Log(\"...\");\n",[91,216,217],{"class":93,"line":100},[91,218,219],{},"LOG.Debug_Log(\"...\");\n",[91,221,223],{"class":93,"line":222},3,[91,224,225],{},"LOG.Info_Log(\"...\");\n",[91,227,229],{"class":93,"line":228},4,[91,230,231],{},"LOG.Warn_Log(\"...\");\n",[91,233,235],{"class":93,"line":234},5,[91,236,237],{},"LOG.Error_Log(\"...\");\n",[91,239,241],{"class":93,"line":240},6,[91,242,243],{},"LOG.Fatal_Log(\"...\");\n",[91,245,247],{"class":93,"line":246},7,[91,248,249],{},"LOG.CustomName_Log(\"BTC\", \"...\");\n",[91,251,253],{"class":93,"line":252},8,[91,254,255],{},"LOG.Configure(o => { ... });\n",[70,257,259],{"id":258},"_4-breaking-changes-read-carefully","4. Breaking changes (read carefully)",[261,262,264],"h3",{"id":263},"_41-dropped-targetframeworks","4.1 Dropped TargetFrameworks",[28,266,267],{},"OzaLog v3.0 supports:",[269,270,271,282],"ul",{},[272,273,274,275,278,279],"li",{},"✅ ",[16,276,277],{},"netstandard2.0"," \u002F ",[16,280,281],{},"netstandard2.1",[272,283,274,284,278,287,278,290],{},[16,285,286],{},"net8.0",[16,288,289],{},"net9.0",[16,291,292],{},"net10.0",[28,294,295,296,80],{},"OzaLog v3.0 ",[31,297,298],{},"drops",[269,300,301,308,314],{},[272,302,303,304,307],{},"❌ ",[16,305,306],{},".NET Framework 4.6.2"," — use Ozakboy.NLOG v2.1.0 if you need .NET Framework",[272,309,303,310,313],{},[16,311,312],{},"net6.0"," (Microsoft EOL Nov 2024)",[272,315,303,316,319],{},[16,317,318],{},"net7.0"," (Microsoft EOL May 2024)",[28,321,322],{},"If you're still on .NET 6\u002F7, upgrade to net8 LTS first.",[261,324,326,327,330,331,334],{"id":325},"_42-loglevelcostomname-loglevelcustomname-typo-fix","4.2 ",[16,328,329],{},"LogLevel.CostomName"," → ",[16,332,333],{},"LogLevel.CustomName"," (typo fix)",[28,336,337],{},"The enum value name was a typo. Fixed in v3.0:",[82,339,341],{"className":84,"code":340,"language":86,"meta":87,"style":87},"- LogLevel.CostomName\n+ LogLevel.CustomName\n",[16,342,343,348],{"__ignoreMap":87},[91,344,345],{"class":93,"line":94},[91,346,347],{},"- LogLevel.CostomName\n",[91,349,350],{"class":93,"line":100},[91,351,352],{},"+ LogLevel.CustomName\n",[28,354,355,356,359],{},"The numeric value (",[16,357,358],{},"99",") is unchanged so wire-format \u002F serialized representations still match.",[25,361,362],{},[28,363,364,365,368],{},"99% of users never touch this enum directly (the public API is ",[16,366,367],{},"LOG.CustomName_Log(...)",", with the correct spelling). If you do reference the enum value in code, update it.",[261,370,372,373,376],{"id":371},"_43-new-logoptions-properties-additive-not-breaking","4.3 New ",[16,374,375],{},"LogOptions"," properties (additive — not breaking)",[28,378,379],{},"You can ignore these unless you want to use them:",[82,381,383],{"className":205,"code":382,"language":207,"meta":87,"style":87},"LOG.Configure(o =>\n{\n    \u002F\u002F ... existing options ...\n\n    \u002F\u002F NEW in v3.0\n    o.EnableGlobalExceptionCapture = false;   \u002F\u002F default false; opt-in for AppDomain handler\n    o.MaxOpenFileStreams = 100;               \u002F\u002F LRU upper bound (default 100)\n    o.DiskFlushIntervalMs = 100;              \u002F\u002F disk flush interval (default 100ms)\n    o.OnDropped = () => { \u002F* counter *\u002F };    \u002F\u002F backpressure callback\n});\n",[16,384,385,390,395,400,406,411,416,421,426,432],{"__ignoreMap":87},[91,386,387],{"class":93,"line":94},[91,388,389],{},"LOG.Configure(o =>\n",[91,391,392],{"class":93,"line":100},[91,393,394],{},"{\n",[91,396,397],{"class":93,"line":222},[91,398,399],{},"    \u002F\u002F ... existing options ...\n",[91,401,402],{"class":93,"line":228},[91,403,405],{"emptyLinePlaceholder":404},true,"\n",[91,407,408],{"class":93,"line":234},[91,409,410],{},"    \u002F\u002F NEW in v3.0\n",[91,412,413],{"class":93,"line":240},[91,414,415],{},"    o.EnableGlobalExceptionCapture = false;   \u002F\u002F default false; opt-in for AppDomain handler\n",[91,417,418],{"class":93,"line":246},[91,419,420],{},"    o.MaxOpenFileStreams = 100;               \u002F\u002F LRU upper bound (default 100)\n",[91,422,423],{"class":93,"line":252},[91,424,425],{},"    o.DiskFlushIntervalMs = 100;              \u002F\u002F disk flush interval (default 100ms)\n",[91,427,429],{"class":93,"line":428},9,[91,430,431],{},"    o.OnDropped = () => { \u002F* counter *\u002F };    \u002F\u002F backpressure callback\n",[91,433,435],{"class":93,"line":434},10,[91,436,437],{},"});\n",[261,439,441],{"id":440},"_44-internal-architecture-rewrite-transparent-to-you","4.4 Internal architecture rewrite (transparent to you)",[28,443,444],{},"The internals were rewritten for HFT-grade throughput:",[269,446,447,457,464,471],{},[272,448,449,452,453,456],{},[16,450,451],{},"LogItem"," is now a ",[16,454,455],{},"readonly struct"," (zero GC pressure)",[272,458,459,460,463],{},"Persistent ",[16,461,462],{},"FileStream"," pool with LRU eviction",[272,465,466,467,470],{},"Cached timestamp updated every 1 ms (avoids ",[16,468,469],{},"DateTime.Now"," syscall)",[272,472,473],{},"Drop-oldest backpressure when queue is full (was: degrades to synchronous write)",[28,475,476,477,480],{},"If you previously relied on the implementation detail that \"queue full → caller blocks on sync write\", be aware that the new behavior is \"queue full → drop oldest log and keep going\". Use ",[16,478,479],{},"OnDropped"," callback if you need to track drops.",[261,482,484,485,488],{"id":483},"_45-consolewriteline-double-format-bug-fix","4.5 ",[16,486,487],{},"Console.WriteLine"," double-format bug fix",[28,490,491,492,495,496,499,500,503],{},"In v2.x, ",[16,493,494],{},"LOG.Info_Log(\"msg with {0}\", args)"," could produce ",[16,497,498],{},"FormatException"," if console output was enabled and the formatted message contained additional ",[16,501,502],{},"{N}"," placeholders. Fixed in v3.0.",[70,505,507],{"id":506},"_5-files-folders-changed-informational","5. Files + folders changed (informational)",[28,509,510],{},"If you cloned the source repo:",[512,513,514,527],"table",{},[515,516,517],"thead",{},[518,519,520,524],"tr",{},[521,522,523],"th",{},"v2.x",[521,525,526],{},"v3.0",[528,529,530,543,556,569,581],"tbody",{},[518,531,532,538],{},[533,534,535],"td",{},[16,536,537],{},"ozakboy.NLOG\u002Fozakboy.NLOG\u002Fozakboy.NLOG.sln",[533,539,540],{},[16,541,542],{},"OzaLog\u002FOzaLog.sln",[518,544,545,551],{},[533,546,547,550],{},[16,548,549],{},"ozakboy.NLOG\u002Fozakboy.NLOG\u002F"," (solution folder)",[533,552,553],{},[16,554,555],{},"OzaLog\u002F",[518,557,558,564],{},[533,559,560,563],{},[16,561,562],{},"ozakboy.NLOG\u002Fozakboy.NLOG\u002Fozakboy.NLOG\u002F"," (project folder)",[533,565,566],{},[16,567,568],{},"OzaLog\u002FOzaLog\u002F",[518,570,571,576],{},[533,572,573],{},[16,574,575],{},"ozakboy.NLOG.csproj",[533,577,578],{},[16,579,580],{},"OzaLog.csproj",[518,582,583,589],{},[533,584,585,588],{},[16,586,587],{},"NLOG.cs"," (filename)",[533,590,591],{},[16,592,593],{},"LOG.cs",[70,595,597],{"id":596},"_6-if-you-cannot-migrate-now","6. If you cannot migrate now",[28,599,600,602,603,606],{},[16,601,18],{}," v2.1.0 will remain published on NuGet (with a deprecation marker pointing to OzaLog), so existing projects continue to install and run. ",[31,604,605],{},"No updates will be made to v2.x — including no security patches",". If you need a fix, the only path forward is OzaLog v3.0+.",[28,608,609,610,613],{},"The git tag ",[16,611,612],{},"v2-frozen"," marks the final v2.x state in the repository.",[70,615,617],{"id":616},"_7-need-help","7. Need help?",[28,619,620,621],{},"Open an issue: ",[39,622,623],{"href":623,"rel":624},"https:\u002F\u002Fgithub.com\u002Fozakboy\u002FOzaLog\u002Fissues",[43],[626,627,628],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}",{"title":87,"searchDepth":100,"depth":222,"links":630},[631,632,634,635,645,646,647],{"id":72,"depth":100,"text":73},{"id":144,"depth":100,"text":633},"2. Update using statements",{"id":190,"depth":100,"text":191},{"id":258,"depth":100,"text":259,"children":636},[637,638,640,642,643],{"id":263,"depth":222,"text":264},{"id":325,"depth":222,"text":639},"4.2 LogLevel.CostomName → LogLevel.CustomName (typo fix)",{"id":371,"depth":222,"text":641},"4.3 New LogOptions properties (additive — not breaking)",{"id":440,"depth":222,"text":441},{"id":483,"depth":222,"text":644},"4.5 Console.WriteLine double-format bug fix",{"id":506,"depth":100,"text":507},{"id":596,"depth":100,"text":597},{"id":616,"depth":100,"text":617},"Upgrade from Ozakboy.NLOG v2.x to OzaLog v3.0.","md",{},"\u002Fen\u002Fmigration",{"title":6,"description":648},"en\u002Fmigration","FTDfa9TM7fH_v-uL2MF2ojhwFi2iWuMzGAk6oLHuTY8",{"matched":656,"target":651,"all":657},"path()",null,1778734456142]