Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: Cannot modify header information - headers already sent by (output started at /home/.sites/946/site2164767/web/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /home/.sites/946/site2164767/web/blog/wp-includes/feed-rss2.php on line 8 ZoolWay – ZoolWay https://blog.zoolway.com Coder, Gamer, Gentleman Fri, 28 Oct 2016 20:34:50 +0000 en-US hourly 1 https://wordpress.org/?v=6.0.9 Switching To Disqus Comments https://blog.zoolway.com/switching-to-disqus-comments https://blog.zoolway.com/switching-to-disqus-comments#comments Fri, 28 Oct 2016 20:32:00 +0000 http://blog.zoolway.com/?p=164 A short note today: I installed the Disqus comment system to enable easy notifications and comment logins for visitors. The system is wide-spread and works fine. Enjoy 🙂

Thanks to chrisonline for the hint 😉

]]>
https://blog.zoolway.com/switching-to-disqus-comments/feed 2
Changing the tongue with Windows 10 https://blog.zoolway.com/changing-the-tongue-with-windows-10 https://blog.zoolway.com/changing-the-tongue-with-windows-10#respond Wed, 31 Aug 2016 20:01:20 +0000 http://blog.zoolway.com/?p=142 When I changed my job I started to work with an English Windows – so English is the primary system language. To a developer this can feel quite natural and I became so used to it that I would like to have this on my machine at home, too.

But there are always these prejudices from the “old age” ™. Changing the primary language in Windows always was impossible. If you really wanted to have Windows itself change, you had to re-install with a different installation medium.

This time I learned something from an older brother of mine. He is not an IT guy but wanted to change the language on a machine for one of his engine customers. I was all the “oh no, this is not possible” – way when he found out and told me: You can quite easily obtain more language packs for Windows 10 and you can switch your primary display langauge which will even include login screen if you want!

So just go to your control panel and start your journey. Note: Mix and match is possible, so you can pick different styles for numbers, dates, windows display language and keyboard layout. \o/

sl1

As always you do not only have a language but regions which define language, formattings and even dialects (the word for January differs between “German (Germany)” and “German (Austria)”!). Click “Add a language”. You will get a huge ammount to choose from. Get all you want.

sl2

Note they are not installed immediately:

sl3

Open the langauge and select to install the language pack.

sl5

This will download some megabytes and then require a reboot. Go back here afterwards.

Now define your Windows display language by selecting “Make this the primary language”.

sl7

After logged off and in you have no change your Windows display language:

sl8

Time to look at the advanced settings. Maybe you want to stick to your “old” keyboard layout? And not always select it after every reboot?

sl13

You can chose to have the input language not defined by the language list (where English is now number one for me) but select a dedicated layout. This still allows you to change the input language with the language bar at any time you want!

One more thing: Have a look at the link in the very first category here: “Apply language settings to the welcome screen, system accounts and new user accounts”. Click it and you can change these options, too. Very nice!

sl11 sl12

]]>
https://blog.zoolway.com/changing-the-tongue-with-windows-10/feed 0
Open an elevated command prompt from the folder context menu https://blog.zoolway.com/open-an-elevated-command-prompt-from-the-folder-context-menu https://blog.zoolway.com/open-an-elevated-command-prompt-from-the-folder-context-menu#comments Sat, 27 Aug 2016 13:33:38 +0000 http://blog.zoolway.com/?p=137 You might already know, the Windows Explorer has an extended context menu if you hold down “shift” while press the right mouse button. My personal favorite here is “Open command window here”. A prompt appears just in the folder you clicked. With lately increasing workload using the command-line this is a great help for me every day.

But as a developer often enough I require an elevated prompt. You can right-click a shortcut as select “Run As Administrator” to achieve this. But the prompt opened by above feature is never elevated. Also there is no command to elevate it. Sure, you could just run runas /user:Administrator@localhost cmd – but that is not running under your current user. Still I have not looked into the Linux subsystem features prepared by the Win 10 anniversary update – but I found this cool registry entry on the web which adds a second context menu entry which gives you an elevated prompt (of course, after UAC confirmation).

https://gist.github.com/ZoolWay/1df8ce81ba21b55b35a44ba468f0f04d

Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open elevated command window here"
"Extended"=""
"NoWorkingDirectory"=""
"HasLUAShield"=""
 
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Open elevated command window here"
"Extended"=""
"NoWorkingDirectory"=""
"HasLUAShield"=""
 
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

Credits belong here: http://www.sevenforums.com/general-discussion/75069-open-elevated-command-window-here.html#post657181

Have fun:

elevated-prompt

]]>
https://blog.zoolway.com/open-an-elevated-command-prompt-from-the-folder-context-menu/feed 3
Publish nuget packages with .NET Core https://blog.zoolway.com/publish-nuget-packages-with-netcore https://blog.zoolway.com/publish-nuget-packages-with-netcore#respond Mon, 01 Aug 2016 20:57:54 +0000 http://blog.zoolway.com/?p=132 Some time ago I posted about publishing your own project Open-Source with GitHub and NuGet: Go open-source with your .NET project. Since then many things happened – but today I want to tell you how to publish to NuGet when you have already tipped your toes into the .NET Core lake. For some recent preparations I built a middleware for ASP.NET Core to proxy calls (mainly for APIs and development) to other hosts and/or endpoints. This can especially be helpful to work around CORS restrictions when you host a SPA and have your API on other servers/ports/endpoints ASP.NET Core might proxy that calls for you. This might bring up some interesting posts about Aurelia and .NET Core but for the moment I want to publish that middleware for everyone.

So let’s go back to my old post. The steps involved creating a .nuspec file. With .NET Core this is no longer necessary, the new generation comes with some awesome command line utilities and a project.json for all your project configuration tasks. You can create a .nupkg with a simple dotnet pack call. With some command line arguments you select the build configuration. But with a minimal project.json you might miss some of the typical nuget setting. A blog post of Armen Shimoon reveals all the nice details, read it up: Where Does dotnet Get NuGet Package Metadata?

So with that knowledge we just have to add some authors, owners, releaseNotes, projectUrl, licenseUrl, tags and maybe others. The rest is up to dotnet pack -c Release.

Oh, if you would like to take a look at that API proxy middleware, checkout GlacierCrates.AspNetCore.ApiProxy.

]]>
https://blog.zoolway.com/publish-nuget-packages-with-netcore/feed 0
Remote Play Update (PS4 3.50) https://blog.zoolway.com/remote-play-update-ps4-3-50 https://blog.zoolway.com/remote-play-update-ps4-3-50#comments Sun, 24 Apr 2016 15:24:46 +0000 http://blog.zoolway.com/?p=114 Not long ago Sony released firmware 3.50 for their popular PS4. One of the feature of this new version is remote play support for Windows and Mac. After my first two reviews of remote play (Playstation TV, Remote Play Impressions and No news on PS TV) time to take a closer look again.

With Microsofts plans for the UWP and bringing Xbox One playing to the PC, Sonys move it is not a big surprise. In fact, with the Vita / PS TV remote play feature and Playstation Now the also should already have the tech. Nevertheless this was fast: With firmware update 3.50 remote play got compatible with PC (Win 8+) and Mac. The client can be downloaded from https://remoteplay.dl.playstation.net/remoteplay/lang/en/index.html.

So, if you have read on my old blog entries on remote play on the Playstation platform you can image that I was not very enthusiastic about it.


 

PC Remote Play

Let’s start with PC remote play. Installation and running the software is not problem at all. You have to connect your dualshock 4 controller with the micro usb interface to your computer and (if not already done) enable remote play on your PS4. A small hint for starters: Go right into the settings because it launches with 540p and refresh frequency set to “standard”. This will give you an unnecessary blurry experience. Go for 720p and set the frequency to “high”. This way play recordings will be disabled but if you do not need it these are the best settings.

I will not do a detailed text here but share my experience. With 720p set up the graphics will not be the best but good enough. And the input lag was highly minimized. I did some tests with Fallout 4, Rocket League, Shovel Knight and Resogun. Opposed to my former experience the input lag is now acceptable. Sony did a great job to improve on this.

Sure, this is not the same as playing with your PS4 at 1080p and you have to keep screen distance in mind. But this is not bad!

PS4 Remote Play

 

PS TV Remote Play

With this nice experience with the remote play feature on Windows I was wondering if the situation with Playstation Television has improved on behalf of that.

To keep things short here too: Yes! The input lag was also minimized with this update and using the PS4 on my Vita TV, oops, PS TV, is now an option again. Personally I would say that the graphic quality is better with PS TV than on PC but that could also be caused by the television and screen distance.


A nice fact to add: With the active standby mode of the PS4 the PC and the PS TV can even remotely start the PS4. Nice!

With the current results even Playstation Now feels more doable now – when we get the bandwidth 😉

]]>
https://blog.zoolway.com/remote-play-update-ps4-3-50/feed 4
Logging – Human Readable vs. Machine Parsable https://blog.zoolway.com/logging-human-readable-vs-machine-parsable https://blog.zoolway.com/logging-human-readable-vs-machine-parsable#comments Wed, 09 Mar 2016 19:53:46 +0000 http://blog.zoolway.com/?p=103 I have often encouraged other to implement proper logging even in the smallest projects. My .NET MVVM template available at GitHub comes with log4net per default. There is no need to reinvent the wheel. Besides log4net there is NLog and other frameworks. Most can target many diverse storages like files (with automatic rolling), the Windows event log, UDP ports and more. This way we get some decent log files.

Human Readable

With some log file rolling and different log levels it is mostly a good idea to log data which can be important, especially in production debugging. When you get the users to send you the log file or a feedback tool does that for them, great. Now you got your hands on some information which should look useful. Example:

2016-03-08 22:30:53,263 [8] DEBUG Zw.JsonLogViewer.AppBootstrapper - Creating bootstrapper
2016-03-08 22:30:53,717 [8] INFO  Zw.JsonLogViewer.ViewModels.ShellViewModel - Loading last-used logfile: 'D:\Daten\Tech Files\Development\dotNET\..\bin\Debug\1\lastrun.json.log'
2016-03-08 22:30:53,729 [11] DEBUG Zw.JsonLogViewer.ViewModels.LogViewModel - Opening log 'D:\Daten\Tech Files\Development\dotNET\..\bin\Debug\1\lastrun.json.log'
2016-03-08 22:30:53,737 [11] DEBUG Zw.JsonLogViewer.Parsing.Parser - Parsing log file 'D:\Daten\Tech Files\Development\dotNET\..\bin\Debug\1\lastrun.json.log'
2016-03-08 22:30:53,859 [11] DEBUG Zw.JsonLogViewer.Parsing.Parser - Parsed 331 lines into 331 log entries
2016-03-08 22:30:53,860 [11] DEBUG Zw.JsonLogViewer.Parsing.Parser - Providing 6 keys as columns: date,level,appname,logger,thread,message

Write done what is important in a nice human readable way. No binary dumps needed 😉

Okay, now that you got this 8MB of text right infront of you, the text editor for your choice will search for “ERROR”, a logger name and other subjects. Some advanced editors are able to hide all lines in a file which do not match your criteria. This way you can try to only show INFO messages.

When you have done this, you will find out that handling logs with several hundreds or even more lines can be a pain. Although these files are there to help you finding bugs – and might be your only debugging help in production scenarios (where it might be not possible to connect with a remote debugger).

Machine Parsable

Of course, I do not want to go back to any kind of proprietary log format – less readable and you have to write your own parser. A good idea is to go with a well know format. XML got infamous because most people do not like XML namespaces and the redundant information due to the closing tags. The fall of XML was the rise of JSON. It is a more lightweighted format (also there is an optional schema feature out there) and parsers are available for almost any programming language. If we provide the information about our log statements as JSON objects it could easily be parsed.

{"date":"2016-03-06T18:18:37.3018646+01:00","level":"INFO","logger":"State","thread":"9","message":"Beta 'Anzu' 2.2.1.3 starting"}
{"date":"2016-03-06T18:18:37.4539737+01:00","level":"DEBUG","logger":"MyApp.App","thread":"9","message":"This log channel is DEBUG enabled and might contain really much information. For production usage we recommend setting the log level to INFO or WARN."}
{"date":"2016-03-06T18:18:37.5140168+01:00","level":"INFO","logger":"MyApp.AppBootstrapper","thread":"9","message":"Creating bootstrapper..."}
{"date":"2016-03-06T18:18:37.5820649+01:00","level":"DEBUG","logger":"MyApp.AppBootstrapper","thread":"9","message":"Running bootstrapper configuration"}
{"date":"2016-03-06T18:18:37.7261679+01:00","level":"DEBUG","logger":"MyApp.SysCore.License","thread":"9","message":"Providing empty license without translation"}
{"date":"2016-03-06T18:18:37.7411796+01:00","level":"DEBUG","logger":"MyApp.App","thread":"9","message":"Application is starting..."}

As you can see this approach assumes every file line is a JSON object. You could also have the complete file to be an array of JSON objects – but this would require to rewrite the end of the file all the time to enlarge the array. If the app crashed and the log writer cannot flush, you might end up with a destoryed JSON array. Therefore I prefer the “one line = one JSON object” approach.

You can image, this is slightly harder to read for a human but not too hard. Also using a text editor’s search feature might work even better because of the object property names visible all the time.

A format like this can be achieved in log4net with the additional libraries log4net.Ext.Json, log4net.Ext.Json.Serializers.Newtonsoft and (of course) Json.NET (former Newtonsoft.JSON, no .NET app using JSON without it). This is a rolling file appender configuration example:

<appender name="RollingFileJson" type="log4net.Appender.RollingFileAppender">
  <file value="lastrun.json.log"/>
  <appendToFile value="false"/>
  <rollingStyle value="Size"/>
  <maxSizeRollBackups value="5"/>
  <maximumFileSize value="10MB"/>
  <layout type="log4net.Layout.SerializedLayout, log4net.Ext.Json">
    <decorator type="log4net.Ext.Json.Serializers.Newtonsoft.NewtonsoftDecorator, log4net.Ext.Json.Serializers.Newtonsoft" />
    <renderer type="log4net.ObjectRenderer.JsonObjectRenderer, log4net.Ext.Json">
      <factory type="log4net.Ext.Json.Serializers.Newtonsoft.NewtonsoftFactory, log4net.Ext.Json.Serializers.Newtonsoft" />
    </renderer>
    <default />
    <remove value="ndc" />
    <remove value="appname" />
  </layout>
</appender>

This is a lot of assemblies but you might use Json.NET anyways and the other two are due to the modularity. And you could still add your own renderer.

With all this great machine-readable output there is one question left.

How can I read it with filtering and sorting?

I was suprised when I did not find  a nice little tool which would parse any kind of JSON objects into a column based view. If you can recommend any tool for this I would highly appreciate any comment to this post!

What I was looking for was a tool where not all lines would require the same JSON object. There could be a property only added to specific log lines for example. The tool should not crash neither ignore an inconsist JSON object layout through the log file.

Zw.JsonLogViewer

Did I say it would be easy to parse log entries in JSON format? Yes, it is. So I built a small MVVM application to open those files and be able to search, filter and sort log entries.

zwjsonlogviewer

This small sample app is available at GitHub as open source under the Apache 2 license.

It currently features:

  • Full text search through all entries.
  • Providing columns for all object properties found through the complete file.
  • Sorting and filtering based on columns.
  • Detailed JSON view for the selected entry as well as detailed JSON object property view (seleccted through the columns’ context menu).
  • Auto-refresh on file updates.
  • Optional automatic re-opening of the last loaded file.
  • Hiding columns.

Known limitations:

  • The file will be completly loaded into memory so it will consume quite a lot of it.
  • No recent files feature.
  • Only one filter value per column, so you cannot filter on ERROR and WARN for example.

This is just a small basic application but it might come in handy. And you are welcome to send push requests 😉

Further Noteslogs

The concepts here apply not only to the .NET platform but also Java, Ruby, etc – programming in general. Also there a companies providing specialized logging services for desktop and mobile apps. If you are going big, have a look at those – especially when going mobile or cloud where you might require to collect and analyze data from thousands of devices per day or even minute.

Also a log: “a portion or length of the trunk or of a large limb of a felled tree.

]]>
https://blog.zoolway.com/logging-human-readable-vs-machine-parsable/feed 1
No news on PS TV https://blog.zoolway.com/no-news-on-ps-tv https://blog.zoolway.com/no-news-on-ps-tv#respond Wed, 30 Sep 2015 09:04:29 +0000 http://blog.zoolway.com/?p=95 Some time ago I wrote about my poor PlayStation TV experience (and why I kept it anyways).

Back then one idea remained: What about when I just stream the video – but not the controller?

I now took some time to find it out. The basic idea is to connect remote play from the PS TV to my PS4 but using the controller connected to the PS4. That might work because the PS4 is quite near and the radio signal of the controller should be strong enough to connect directly to the PS4.

pstv-controller1I switched on my PS4 with a controller and went over to the other screen. So what happens when PS TV connects to your PS4? First, the controller natively connected to the PS4 gets switched off. Okay, being in the other room – still near enough – I switched it on back without problems. But then I had to decide: Is the now “new” controller my user or another one? I am pretty sure I am myself so I selected my account. Unfortunately this resulted in remote play being disconnected! No chance to connect a controller to the PS4 assigned to my user. While I am not sure why Sony did it this way it is annoying.

Still I wanted to check if with a directly connected controller it would feel better (=less lag). So I connected again using a guest account. Sure, I got no PSN access and no save games. But I started a new game in Shovel Knight.
My subjective experience was still poor. Although I would say it was a bit better than using the controller connected to the PS TV it still had way too much lag.

This is my very own feeling about it but I would interpret it as that the video streaming has way too much lag. The controller only seems like a minor part of it (and logically is in terms of bandwidth).

Remember: My setup uses a gigabit full switched ethernet connection between PS TV and PS4.

I am not sure how Sony ever thought this could work and make anyone happy. With all the time the PS TV is already on the market and new romours that there will be now successor to the Vita I consider PS TV also to be dead. I just hope for one or two more games which run natively on the PS TV and make me happy with it 🙁

]]>
https://blog.zoolway.com/no-news-on-ps-tv/feed 0
Go open-source with your .NET project https://blog.zoolway.com/go-open-source-with-your-net-project https://blog.zoolway.com/go-open-source-with-your-net-project#comments Tue, 29 Sep 2015 17:56:39 +0000 http://blog.zoolway.com/?p=88 Have you ever wondered how hard it could be to share your project with the world wide web?

With Visual Studio 2015, GitHub and NuGet you can easily publish the source code and binary library of your project to the open-source community! Of course you can do similar with other IDEs and platforms but those resemble to most popular ones.

Let us see how easily we can do this.

To try this out I am sharing a .NET geometry PCL library with the world, Zw.Geometry. It most not necessarly be very successful, wide-spread or popular but I just wanted to share it as I cannot find something as simple as it and still have some features to be added. So let us give back and provide others with the possiblity to use an existing library to rotate points in a 2D coordinate system without reading all those trigonometry formulars.

First we will require a GitHub account if you do not have already one. I will use GitHub to publish the source code and be able to share it with others and even be able to accept their inputs to my projects (push requests). Next, for those who will purely consume my library, I will require a NuGet account which is a wide-spread package manager for .NET tools and libraries. It is even not limited to Visual Studio as its command line tools are available of others IDEs and Mono too. With the account we can publish packages for others to use.

os-github1At this point I already started the small solution which consists of the main project file and a test project with the unit tests. With the Microsoft Git Provider the solution already has a local versioning repository.
So we create a new GitHub remote repository with which we will be able to sync. We should not include a README at this point, we can add it later.

After the creation GitHub shows us the URL to the repository, like https://github.com/ZoolWay/Geometry

os-teamexplorer1In Visual Studio we can now select the Team Explorer, Home, Sync and setup the remote repository in the yellow highlighted Textbox (“Publish to Remote Repository”).
After that we can Sync or Push our commits to the remote repository.

Now you can check out your repository in the webbrowser in GitHub and should be able to see all your source code. You can now add a README and license file those will be downloaded to your local repository the next time you perform a sync. Note: That will not be visible in Visual Studio by default because they are not added to the VS solution file but you can see them in the file system and if you would like manually add them to your repository.

At this step you are ready to go. Find some friends to work on your project. They can checkout (subversion speaking) or more clone (git like) the repository.


os-nuget1When you have a nice library (or other project) most people just would like to use it. They are not interested in cloning the repository and have all the code. A binary and reference will be fine. This is what NuGet provides to the .NET community for quite some time now. The NuGet client is available as Visual Studio integration and command line utility but only the later will help you to pack your binary for the NuGet gallery.

I mostly followed the instructions from the NuGet docs and just encountered minor pitfalls here. Thanks to the extension Open Command Line I can just rightclick my project file and open the VS command prompt in the folder. But by default there is no NuGet command line utility so I downloaded it and put it into the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools. It is then available in the path when using VS command prompts.

To create a new .nuspec file for your project you can just

nuget spec

After that I included the Zw.Geometry.nuspec into my solution to easily edit it from Visual Studio. Most things can remain unchanged as placeholders are used (which inject information from AssemblyInfo.cs when packing). I added URLs to my project and license and added some tags.

When everything is ready, the unit tests run fine and you do your first release you can run

nuget pack MyProject.csproj -Prop Configuration=Release -Build

Read the docs to get more information about other flags and dependencies to other projects.

The resulting MyProject.1.0.0.0.nupkg can be uploaded using the NuGet webinterface – or you can automate it with an API key and some scripts.


Those are the main steps. Of course there is many things left to really have a successful open source project but I felt a short starter like this would be helpful.

You can find my small sample library online:

 

]]>
https://blog.zoolway.com/go-open-source-with-your-net-project/feed 1
Playstation TV, Remote Play Impressions https://blog.zoolway.com/playstation-tv-remote-play-impressions https://blog.zoolway.com/playstation-tv-remote-play-impressions#comments Fri, 14 Aug 2015 11:56:13 +0000 http://blog.zoolway.com/?p=79 For a long time I have been thinking about buying a Playstation TV. Most interesting to me is the remote play feature. Yeah, you know it: Your better part would like to watch something on TV in the living room – many great opportunities to use the PS4 on a second TV. But the online reviews about remote play and even the PS Vita compatibility where less promising.

But last week I could no longer resist to check that out by myself!

The price today is as low as 70 euros (in Austria) plus a sufficient memory card (the 1GB internal is not sufficient for very much when you would like to try Vita games). So I got myself a unit and a card from Amazon.

I will now give some insight at the two most interesting features for me. Because for streaming the SmartTV is more than satisfying in my case I did not check out other features. Also note that I used a DualShock 4 controller and I have connected my PS4 and PS TV both to my ethernet network (1.000 MBit/s).

Remote Play

For now I checked out two games: Resogun and Shovel Knight. They should cover some range of the PS4 game portpolio.

As Resogun is quite fast I was not expecting to much. And yes, I must agree with most online reviews. The input lag is too high for a game depending on reaction. While it works it does not feel right and and died quite more often than usually in this game.

The next game was Shovel Knight. Background to it is that it is a cross-buy title and I got it for PS4 as well as PS Vita (/TV) – so I would be able to try it out via Remote Play and directly on the PS TV.
While Shovel Knight is slower than Resogun I must sadly say the result is the very same. Via remote play it just does not feel right. Our beloved knight seem to be petulant and reacts milliseconds too late. With the outcome of many deaths and more frustation.
But let us compare: Thanks to the cloud feature I uploaded my savegame and loaded it into the PS TV version of the game. This improved my mood a lot as playing Shovel Knight natively on the PS TV turned out to be as much fun as on the PS4. It runs smoothly and without any problems!

Vita compatible games

Thanks to my PS+ membership I was already owning some PS Vita games although I do not own a device. So I started downloading all the stuff available from my PSN account to the PS TV (which filled the half of my 16GB memory card). These games do make a lot of fun and run fine.

But if you look out at all the PS Vita games you might get disappointed again! As I was told by other reviews, very few title of the PS Vita portfolio are really available to PS TV. If the game uses the touch feature of the Vita I can image reasons behind that. But even without those games there should be much more. Also sometimes things get even more interesting: While I found Danganronpa 2 (Goodbye Despair) compatible with PS TV the first part of the series Trigger Happy Havoc is not. I would enjoy to start with this (more of a) graphic novel but like to start from the beginning. So currently a no-buy to me 🙁
According to some discussions on the web this is even not a problem of the developers (Spike Chunsoft) or the publisher (NIS) but of Sony itself. I am not sure why because the developer should be able to make a variant without the need for the touch input and mark the game as PS TV compatible – which obviously has happen for the second part.

I would highly like to see improvements here!

Conclusion

Both features, Remote Play and the Vita compatibility, need much more improvement from Sony. With the integration of the Xbox One and Windows 10 gaming (and streaming) there might be the necessary competition to make Sony rework it a bit. I hope so.

Also it occured to me that I could try to use a controller directly connected to the PS4 instead of the one connected to the PS TV. That could perhabs eliminate the input lag and only the display latency would remain. This means the distance to the PS4 should not be too big but in my case it could work. I will give that a try sometime and report back.

And, yes. That means I did not send my Playstation TV back. I decided to keep it – already addicted to Persona 4 Golden 😉

]]>
https://blog.zoolway.com/playstation-tv-remote-play-impressions/feed 2
Windows 10 Upgrade https://blog.zoolway.com/windows-10-upgrade https://blog.zoolway.com/windows-10-upgrade#respond Sun, 09 Aug 2015 20:39:34 +0000 http://blog.zoolway.com/?p=76 2015 is an interesting year. Since Microsoft announced that .NET goes open source last year I more and more got the feeling the guys are making a lot of right decisions at the moment. This year brings us Windows 10 and Visual Studio 2015 – which is a big haul over for us developers out there. But let us start with Windows 10.

I was a fan and user of Windows 8.1 before. So with no doubt I registered for the free upgrade program. This week the time had come and my Windows told me it would be ready to upgrade. While most will prefer to do a clean install I was eager and courious – would an upgrade without a fresh installation really work? I gave it a try.

Long story short: After some installing and rebooting I switched from Windows 8.1 to Windows 10 in less than an hour – automatically!

Windows 10 is amazing and I encourage everyone to upgrade!

If you are still Windows 7 you might find Windows 10 much more attractive than 8. My machine feels faster now and I like the clean but tile-supporting start menu. It just feels like the right evolution of my operating system.

I do not want to keep some minor problems a secret. I ran only into two issues:

  • Fingerprint sensor – After the upgrade I could no longer login with my fingerprints. This is because I had to activate Windows Hello and this requires to configure a PIN first. This is a bit suprising as the PIN feels less secure. After configuring a PIN I could reactivate the fingerprint. Although I configured them the fingerprint login was not available. With some googling I found out I had to completly remove my fingerprint driver and delete all registred fingerprints. Then I reinstalled the fingerprint driver (which is from Win 8 by the way) and re-registered the fingerprint – and Windows Hello started to work fine!
  • VirtualBox and Docker – Yes, I will come to the details later when talking about some programming. But VirtualBox and Docker needed some workarounds. VirtualBox 5.0.1 does not seem ready yet for Windows 10 and Boot2Docker also misses some fixes which parameters VirtualBox 5.0.1 supports in Windows 10. I was able to get it to run with VirtualBox 5.0.1 and Docker Machine. With Docker Machine you can use the –driver=virtualbox flag to create the virtual machine which you can use with Docker.
    I guess it just needs some week to have VirtualBox and Docker working out-of-the-box on Windows 10.
]]>
https://blog.zoolway.com/windows-10-upgrade/feed 0