Comments (9)
It's planned :)
from hotel.
@KevinSheedy the way I think about it, is that you can easily integrate any app to log output to logio and then just have hotel manage an instance of that app.
But to increase your request, I would say that If we could completely integrate, at least at first, the output of the command that hotel manages, that could mean that a lot of people could easily stop opening their terminals(including me) to start an app for development, just to have their debugging logs.
How are you thinking of implementing it @typicode. I would love to help.
from hotel.
Hi @kbariotis,
Thank you for the help :). I've hacked something a few weeks ago. It's quite simple to expose an API and use Server-Sent Events to get logs.
However for the UI, I don't know how to mimic the terminal scrollbar (when scrollbar is a the bottom it should always be at the bottom, and if the user moves it, it should stay where it is). It would be helpful if you can look for the code snippet that would allow that.
from hotel.
Hey @typicode, I've tried creating a prototype over Codepen but I couldn't make a nice replication scenario. :P
Anyway, here's the idea using jQuery. This is just the POC:
var scroll = false;
var $terminal = $('.terminal');
$terminal.on('scroll', function() {
/* Determine whether we are at the bottom or anywhere above */
if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
scroll = true;
} else {
scroll = false;
}
});
/* We are inserting logs into the terminal */
if(scroll) {
/* If scrollbar was at the bottom, scroll it down since new text has been added */
$terminal.scrollTop( $section.prop('scrollHeight'));
}
from hotel.
BTW, @KevinSheedy, I have found https://github.com/kilianc/rtail which is a replacement for logio and instead of getting logs through direct calls, it inspects the output of the terminal through pipes. That means that you even use it with hotel even out of the box.
You would add a command like this node server.js 2>&1 | rtail --id "api.myproject.com"
to hotel.
Ref. https://github.com/kilianc/rtail#examples
from hotel.
@kbariotis Thank you for the code snippet 👍
from hotel.
It has been released :) Simply click on the >
icon and you should see logs.
Thank you again for the help and feedback.
from hotel.
When I switch among tabs, the output logs just disappeared and became blank.
What's going on? 😕
from hotel.
Logs are actually not kept in memory.
I plan to improve that in the next releases as it's a little bit annoying for me too 😅
from hotel.
Related Issues (20)
- How to uninstall HOT 1
- ERR_CONNECTION_REFUSED HOT 1
- Proxy servers without starting them? HOT 2
- Path segments after service name not proxying correctly
- Add exceptions for Top Level Domains (TLD) HOT 3
- [FEATURE] pass by environment name of current app HOT 1
- [PROBLEM] Few problems - proxy on chrome, invalid host header with create-react-app
- ERR_INVALID_ARG_TYPE on macOS 10.15 node v14.1.0 HOT 4
- Anyone know a solid alternative? Too many crashes these days... HOT 4
- Typ
- ERR_CONNECTION_REFUSED HOT 2
- Allow overwriting CORS headers for remote server proxies
- Big Sur - LaunchAgents - Load error 5: input/output error HOT 4
- [bug] Doesn't start when use node 14 HOT 4
- Socket hang up error with multiple subdomains Ubuntu 20.04 HOT 1
- ERR_CONNECTION_REFUSED / Connection refused on Windows 10 HOT 1
- Is there a way to change the configuration folder path?
- Run1
- Hotel server not created on M1 mac
- SSL cert.pem and key.pem are not installed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hotel.