Lognote - Log viewer, Android logcat viewer for Windows, Linux, Mac

android logcat viewer for Windows, Linux, Mac


 


https://github.com/cdcsgit/lognote


Filtered log viewer
Android logcat viewer, kotlin + swing


Run
- Windows : start javaw -Dfile.encoding=utf8 -Xmx1024m -jar LogNote.jar
- Linux : java -Dfile.encoding=utf8 -Xmx2048m -jar LogNote.jar
- Mac : java -Dfile.encoding=utf8 -Xmx2048m -jar LogNote.jar


Tips

- Show only specific package logs(~ 0.3.8)
Add shortcut in ubuntu
- Make screen capture(Add button, Use log trigger)

Changes

version 1.0
- Added package selection feature for log output
- Added UI for checking selected area (check area when copying logs)
- UI update

version 0.3.8
- Bug fix (fix exception occurrence when starting on MAC)

version 0.3.7
- Added view by column
- Added process name column
- Modified UI

version 0.3.6
- Bug fixes
- Added log file format setting function (setting file format with different log level information)
- Add log trigger (execute command or output dialog when specific log occurs during aging test)
version 0.3.5
- Bug fix (fix hang during process update)
- Color tags can be applied to regex filters
- Move logcat level setting location from menu bar to bottom status bar
- Added log view (full, filtered) save function

version 0.3.4
- Bug fixes
- Add a pop-up to determine whether to apply previously used filters when opening a recent file.
- Add update cycle setting menu for process information

version 0.3.3
- When the focus is moved by key input in logcat receiving mode, log process information is displayed in the tool tip
- Execution mode displayed on the title bar
- Save / load recent files (save bookmarks)
- Code refactoring
- Outputs a list of available colors when entering '#' in the log filter combo box

version 0.3.2
- Add "Check Update" menu
- When mode is logcat receiving, process info is shown as a tooltip
- Save recent files and filters(Save filters by file)
- Code refactoring
- bug fix

version 0.3.1
- Shortcut logic refactored
- Add color tag menu when adding filter
- bug fix

version 0.3.0
- Add icon to button
- Change the titlebar according to the log mode (Open, Adb, Cmd, Follow) shown in the log view
- bug fix

version 0.2.9
- Change default font: dialog -> dialoginput
- Change text color when regular expression parsing error occurs (notification)
- Move to the previous item when shift-enter is input in search
- bug fix

version 0.2.8
- Added logcat command change function
- Added search function
    Ctrl + F: Show search bar
    ESC: Hide search bar
    F3: Move to the previous item
    F4: Move to the next item
    Click on filter or full log view: set search target view

version 0.2.7
- Added color setting function for each filter item
- Add filter text append function when Ctrl + filter button is executed

version 0.2.6
- Combine UI and log color related settings
- Changed the UI for applying the built-in color palette
- Bug fixes

version 0.2.5
- Added the ability to change the font size of UI components
- Added built-in color palette function (light, dark)
- Filter / bold text FG / BG color settings
- Save file default prefix "LogNote"
- Filter / Apply bold color in case of overlapping bold text
- Improved stability??

version 0.2.4
- Set the config file location by referring to the environment variable "LOGNOTE_HOME"
- Apply FlatLaf (https://github.com/JFormDesigner/FlatLaf)

version 0.2.3
- Apply filter input combo box multi-line
- Fixed the problem that the log aspect ratio does not change below a certain size when adjusting the log aspect ratio
- Code cleanup

version 0.2.2
- Added connection retry logic when connection is lost due to device reboot, etc.
- Save immediately when setting changes (no need to close the window)

version 0.2.1
- Added multi-line bookmark function (simultaneous bookmarking after selecting multiple lines)
- Add color setting item

version 0.2.0
- Improved logcat read speed in adb
- Improved filter application speed
- Add color setting item

version 0.1.9
- Modify so that frequently used filters can be added to the table bar
- Add order change function to filter management dialog
- Add frequently used command management function

version 0.1.8
- Show a list of open files on the status bar tooltip
- Show Error popup when adb connection view fails
- Show include and exclude items in the filter tooltip

version 0.1.7
- Hide unused filter combo box
- Close dialog when ESC key is pressed

version 0.1.6
- Open multiple files at the same time
- added tooltip
- Windows drag & drop improvement
- Added a function to pause log deletion due to scrollback limit

version 0.1.5
- Added log color setting
- Improvement of cursor movement in the entire log view when moving the cursor in the filter log view
- Improved view behavior when deleting logs due to scrollback line limitation

version 0.1.4
- Applied immediately when changing the font in settings
- Save and import filters

version 0.1.1
- Add pop-up menu
- case sensitive

version 0.0.1
- Regular expression filter
- On/Off line log view


Lognote - Make screen capture(Add button, Use log trigger)

 1. Add a screen capture button

Click the "Cmds" button in the full log view to go to "Cmd Manager"


Add a button in Cmd Manager with "New"






Create a screen capture command script and enter the path





Check the saved file by executing the screen capture button



2. Capture the screen when a specific log occurs
Run the trigger screen with View > Log Trigger
Add a trigger with the "Add" button

After executing the trigger, check the capture file save when the log occurs ("screencapture test")

Settings programs and environments when installing Ubuntu 22.04

 Things to do by default when install Ubuntu 22.04


1. Basic programs
Terminal program - Split window is more convenient than tab view
sudo apt install terminator
Install ssh server for remote connection
sudo apt install openssh-server
sh is symbolized as dash, so change it to bash
sudo ln -sf bash sh
Install for system resource monitoring
sudo snap install htop
Install to use ifconfig
sudo apt install net-tools

2. Install ZSH - Greatly increases efficiency when working on the terminal
After installing zsh, install oh-my-zsh
sudo apt install zsh
Also install curl
sudo snap install curl
Download the installation file with curl and install
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install prompt theme - It's easy to use because it looks good
cd .oh-my-zsh/custom/themes
git clone https://github.com/romkatv/powerlevel10k.git

2-1. Installing zsh plugins
With a little typing, it shows the previously executed commands
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Colorize the input
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
More convenient when executing the cd command, display the list through fzf and move to the directory to move to
git clone https://github.com/b4b4r07/enhancd.git $ZSH_CUSTOM/plugins/enhancd
cd .oh-my-zsh/custom/plugins
git clone https://github.com/arzzen/calc.plugin.zsh.git
sudo apt install fzf
A command that adds color to the cat command
sudo apt install bat
A command that makes the ls command look better, such as by displaying icons
sudo apt install ./lsd-musl_1.0.0_amd64.deb

3. Installing fonts
You need to install nerd fonts to see the results normally while using zsh
git clone https://github.com/ryanoasis/nerd-fonts.git
cd nerd-fonts
./install.sh
Install D2Coding fonts - I like the look
.local/share/fonts/D2Coding-Ver1.3.2-20180524-all.ttc .
Apply command to installed font system
fc-cache -fv
Install fonts to see emoji
sudo apt install fonts-emojione
sudo apt install fonts-noto-color-emoji

4. Install the browser
Search/download the chrome file and install it
sudo apt install ./google-chrome-stable_current_amd64.deb

5. Install development tools
Install neovim (separate plugins)
tar xvfz nvim-linux64.tar.gz
cd nvim-linux64/bin
cd .vim
mkdir bundle
cd bundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Source management tools - git, repo
sudo apt install repo
sudo apt install python
sudo apt install python3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
sudo apt install git
Install vscode - I mainly use c++, java, and there's nothing better than this
sudo apt-get install wget gpg\nwget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg\nsudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg\nsudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'\nrm -f packages.microsoft.gpg
sudo apt install apt-transport-https
sudo apt update
sudo apt install code
Install docker when you want to avoid the build environment being affected by Linux distributions and versions
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg\nsudo install -m 0755 -d /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\nsudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \\n "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \\n "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \\n sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo docker run hello-world
sudo usermod -aG docker $USER
git diff pretty view
chmod 755 diff-so-fancy
Comparison tool
sudo apt install ./bcompare-4.3.6.25063_amd64.deb
For C language reference in vim plugin
sudo apt install libclang-dev
For kotlin, java development
tar xvfz ideaIC-2023.2.5.tar.gz

6. Other utilities
grep improved version
sudo apt install ripgrep
find improved version
sudo apt install fd-find
Run terminal immediately at any time(drop-down)
sudo apt install guake
install teams
sudo snap install teams-for-linux
install remote desktop
sudo apt install remmina
tools for GNOME configuration
sudo apt install gnome-tweaks
sudo apt install dconf-editor
sudo apt install gnome-shell-extension-manager
virtual machine - sometimes you need windows

mount remote file system via ssh
sudo apt install sshfs
create gif capture from screen
sudo apt install peek
check temperature
sudo apt install lm-sensors
sudo apt install psensor
Drawing, Image Editing
sudo apt install gimp

Lognote - Show only specific package logs (1.0 ~)

This function uses information about installed packages, so it proceeds with the app installed first.

 

1. run Package list dialog(click "packages")


2. select Package(select / unselect package : ENTER key or Double click)


3 - 1. apply package - restart Logcat(ex : 2 packages selected)


3 - 2. apply package - restart Logcat (ex : 1 packages / show only selected package)






Lognote - Setting up a shortcut to re-run from the running icon in Ubuntu

 Create an executable icon desktop file.
Path: ~/.local/share/applications/Lognote.desktop
Set the Exec and Icon items according to the installed location.

[Desktop Entry]
Name=Lognote
Comment=Lognote
Exec=/home/USER/lognote/lognote.sh %U
Icon=/home/USER/lognote/lognote.png
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Categories=TextEditor;
Keywords=Text;Plaintext;
X-Ubuntu-Gettext-Domain=lognote

If you search for lognote in the Applications menu, you can see that an icon has been created.











If you add it to favorites and run it, the running icon and favorites are separated, and if you ctrl-click the icon after running, there is no response.
If other programs,  new window is created when you ctrl-click it. 

The reason is that "StartupWMClass" is not set.

If you type the "xprop WM_CLASS" command in terminal while the program you need to check is running, the cursor will change.
If you click the the program, WM_CLASS information will be output.

$ xprop WM_CLASS
WM_CLASS(STRING) = "com-blogspot-cdcsutils-lognote-Main", "com-blogspot-cdcsutils-lognote-Main"

Add "StartupWMClass=..." to the desktop file.


[Desktop Entry]
Name=Lognote
Comment=Lognote
Exec=/home/USER/lognote/lognote.sh %U
Icon=/home/USER/lognote/lognote.png
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Categories=TextEditor;
Keywords=Text;Plaintext;
X-Ubuntu-Gettext-Domain=lognote
StartupWMClass=com-blogspot-cdcsutils-lognote-Main
You can see that when you ctrl-click, a new window opens without separating it from your favorites.


How to check the size of JLabel before show it on the screen in JDialog

 When configuring a JDialog, there are times when you need to check the size of a JLabel.

Even if you set the text after creating a JLabel, its size is not set.


In this case, if you set the dialog panel and then call pack(), the size of the JLabel will be set and you can read the value.

Then, you can create the necessary UI using the read size value and set the panel again.


When a JLabel is placed next to another component, it is used to fit the window size.


Lognote - My toy project

In a project, the code work is limited


When I say, "I think it will work if I change it like this," I get, "If it doesn't cause any problems, leave it as is."

Since code can cause unexpected issues if changed, I can't change it as I please.

Especially for work...


That's why I thought of the Toy project I read in the book.

Codes that I can modify as I please without affecting my work

When I was thinking about what to make, I thought it would be good if it could help my work, so I started making a log viewer.

Since it started in 2020, I worked on it for quite a long time.

I worked on it when I had time, so it didn't progress quickly, but I think it was made usefully.


When I first made it, there were a lot of errors, so I was embarrassed..

When I looked at the log, I added the parts I thought were necessary and fixed the errors.

Since the development work was done as I wanted and didn't require anyone's permission, it was fun.

Even now, when my head feels like it's stopped, I think about how to change it and apply the changed code.


When you want to freely change the code but can't, and want to relieve that frustration, try thinking about a Toy project, which can be helpful in its own way.

Lognote - Log viewer, Android logcat viewer for Windows, Linux, Mac

android logcat viewer for Windows, Linux, Mac   https://github.com/cdcsgit/lognote Filtered log viewer Android logcat viewer, kotlin ...