Coder Social home page Coder Social logo

Comments (11)

noahgibbs avatar noahgibbs commented on June 27, 2024

Orchil will have a more difficult time with this because it can't easily save text files. It could save to local storage and/or make logs downloadable, but those are really its only options. So this probably won't be terribly convenient for players since there's no way to just set-and-forget logging. You'd have to have periodic downloads.

from orchil.

noahgibbs avatar noahgibbs commented on June 27, 2024

Huh. Looks like there's some existing logging code. Specifically there's an "autolog" preference and a "prompt_savelog" preference to persist log data and to offer to download it on disconnect. I don't think I can do much better than that in a browser. While there are some file-related logging preferences, they describe file logging as "not yet enabled" and I don't think it's really possible - browser apps aren't supposed to be able to save random files on your disk, for good reasons.

from orchil.

kurzon-marrach avatar kurzon-marrach commented on June 27, 2024

The prompt_savelog feature I believe is the one I referenced earlier; enabling it causes Orchil to prompt you on whether you would like a log saved when you enter 'quit' to disconnect. It doesn't send that prompt, however, if you hard disconnect by closing out the browser window (which realistically is how players 'log out' 99% of the time) so it has limited use. I'm not sure what the autolog preference would be, I don't see that in the clientpref interface.

Zealotry's auto-logging feature saves the log as a plain .txt file to a file path of your choosing on your disk, though zealotry is quite old and there may have been different rules in place for extensions at the time of conception. Much more recently though, I believe @AnthonyHJ got auto-logging working for his 3rd party client, Merciful, by causing it to automatically download the log as a .txt file on to your hard drive any time the session is terminated? He would have more information / suggestions.

Elsewise if we can't get it to work, we'll just have to cope without. It was something players asked for more than something I personally felt imperative, the big ones for me were fixing the colors and getting MACROs functional.

from orchil.

AnthonyHJ avatar AnthonyHJ commented on June 27, 2024

Merciful stores the log in LocalStorage as you go along (rendering new lines turned out to be more processor-intensive than writing to LocalStorage when I tested it) and then saves from there before deleting the LocalStorage version. I still consider it a clunky solution, but that was to fix differing implementations just between the Chromium browsers.

The main issue is that Zealotry has write-access to the user's hard-drive; security settings on almost every other browser (you need Pale Moon, a fork of an OLD version of Firefox to run Zealotry now) will not permit either the saving of files outside the Downloads folder or appending an existing file. That's why clients download a blob file at the end of a session.

That said, Google did test some new file-system code not too long ago (on a limited dev branch) and that may return in the future as a Chromium feature.

from orchil.

noahgibbs avatar noahgibbs commented on June 27, 2024

Part of it is that Orchil isn't an extension - it's just a web page. That's why you don't have to install it, but also why it can't write files. If we wanted logfiles to work in some reasonable way, we'd probably need a solution with different moving pieces -- an additional app to install or something. Server-side storage of the logfiles would be possible, as an example, but that's a great example of a case where there are a lot of security and privacy implications and we'd want to think long and hard before just doing it. Similarly it'd be possible to attach an extra logger program that got a copy of everything a particular player was doing and wrote it to a file, but not clear if that's a great idea either - and people would have to run that program if they wanted logfiles.

Oh hey, looks like autolog was never fully implemented. It looks like it was intended to be like you describe - save log lines in localstorage until they can be manually downloaded later.

While it's not impossible to have Orchil offer to let you download the logs when you close the window, it's probably obnoxious and a bad idea.

from orchil.

AnthonyHJ avatar AnthonyHJ commented on June 27, 2024

The only extension-specific behaviour I use is checking if the download failed before discarding the logs. Everything else is just standard browser scripts.

from orchil.

noahgibbs avatar noahgibbs commented on June 27, 2024

Sure, I mean for file writes like Zealotry - those are prevented, for good reasons. Yeah, it would be possible to implement the same clunky solution (or a similar one) in Orchil to what you describe in Merciful.

from orchil.

kurzon-marrach avatar kurzon-marrach commented on June 27, 2024

So given all of the above, what are our overall thoughts on the best way to implement some kind of autologging feature?

Given the hoops our players jump through to maintain access to zealotry, I imagine they wouldn't be too resistant to just downloading some kind of extension or autologging app for orchil if it gave them the result they want. Storing logs on the server even temporarily sounds risky; could people theoretically abuse such a feature to upload things that could compromise the server?

from orchil.

noahgibbs avatar noahgibbs commented on June 27, 2024

Uploading things that would compromise the server would be hard if it's done reasonably. But people's logs being downloaded without their knowledge or consent would be possible - that's what worries me more.

Looks like if you connect twice in the normal way, SkotOS just disconnects the older one (very reasonable.) So we'd need some kind an intentional "echo connection" that just got a copy. I'll think about it.

But I don't think there's an easy way to do better logging that I can do rapidly. So I don't think this feature will show up until I have more time okayed by Chris at some point in the future.

from orchil.

shentino avatar shentino commented on June 27, 2024

Regarding the "disconnects the older one" I think I should point out that it should be made clear here whether that's referring to player accounts or characters.

I'm pretty sure it's characters since it's possible for one player to have more than one character, but I just wanted to request that it be explicitly documented or declared one way or the other.

from orchil.

AnthonyHJ avatar AnthonyHJ commented on June 27, 2024

If you log into a character who is not currently logged in and belongs to the account currently logged in, that will not inherently affect any sessions or other characters.

If you log into the same character, the first connection is ended.

In you log into the same account elsewhere (different browser, for example), any currently-active character's WebSocket connection persists (not tested non-WS clients), but the session password changes and so you can't log in any characters in the original session.

from orchil.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.