guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erin Versfeld <erinversf...@gmail.com>
Subject Re: Console.log messages not included post minification
Date Wed, 01 Nov 2017 13:01:08 GMT
Thanks, Ryan and Nick,

I've played around with all the log settings in the browser console, and
run my app on multiple browsers, so that at least can be rules out as an
issue for now.

Looking more closely at minify-maven, one of the tools its built on top of
is Google's Closure Compiler, which "parses your JavaScript, analyzes it,
removes dead code and rewrites and minimizes what's left", which could
potentially explain this behaviour. Commenting out that whole process from
the pom file then breaks things because app.js isn't build. I'm playing
around with changing the index.html and seeing if just pointing it to the
individual .js files works, but alternative suggestions are also welcome.

I tried injecting the $log service, but had no luck. It's entirely possible
that I wasn't doing it correctly, though, so I'm heading back to the docs
to confirm that.

I am modifying the client rather than using the API portions of the client
code to write a custom app. The kinds of errors I expect to see are the
stock standard HTTP errors, like 404s, 500s, etc. I'd just like to have a
little pop up or display a relevant error message when these errors occur.
The browser is able to tell which of these errors has occurred, so it looks
like everything is working as expected, its just handling this on the
client side which is proving irksome. I'm trying to use the logs to work
out where things should be handled but aren't.

Thanks for all your advice!

All the best,
Erin



On Mon, Oct 30, 2017 at 11:15 PM, Nick Couchman <vnick@apache.org> wrote:

> On Mon, Oct 30, 2017 at 03:19 ErinVersfeld <erinversfeld@gmail.com> wrote:
>
>> I'm new to Guacamole, and am trying to adapt the base client for a project
>> I'm working on. However, I'm having trouble with getting my console.log
>> message to be included in the minified JavaScript. I'm assuming that it's
>> the minification process that's removing them, because the logs are in the
>> source code on my machine, but I can't work out where  the minification is
>> happening. Do you perhaps have any advice for me?
>>
>
> I've never had the minification process strip out log messages. However, I
> have noticed that Chrome seems to filter then by default.  There's an
> option when you're looking at the console to change what messages get
> displayed - make sure that you have it set to show all messages.
>
> Also, it's a little cleaner to inject the $log service into the angular
> code you're writing and use $log.debug() (or warn/info) and use that to log
> your messages.
>
>
>> I'm trying to use the logs to work out why my modified version of the
>> client
>> isn't displaying HTTP error messages, even though they're coming through
>> to
>> it. I've also tried using dummy variable to track a similar thing, but I
>> can't get that working either. I'm using tomcat 7 and Xtightvnc.
>>
>
> Are you modifying the client or are you just using the API (-common)
> portions of the client code to write a custom app?  Can you explain further
> where/how you're trying to throw these errors and what your expect to see?
> Also, if you're using Chrome, use the network tab of the dev console to see
> the requests and responses, including response codes and bodies.  This may
> help you see the error if it's being intercepted by some part of the client
> and not pushed all the way through.
>
> -Nick
>



-- 
All the best,
Erin Versfeld

Mime
View raw message