How does one turn on diagnostic and/or progress logging with firebase-tools run as a node module? - firebase

I have not been able to find any reference for the options passed into the node module version of firebase-tools. How do one turn on diagnostic logging or progress output? The github README for firebase tools only says:
The Firebase CLI can also be used programmatically as a standard Node module. Each command is exposed as a function that takes an options object and returns a Promise.
and has only the example:
client.deploy({
project: 'myfirebase',
token: process.env.FIREBASE_TOKEN,
cwd: '/path/to/project/folder'
}).then(function() {...
It would be really nice to get complete docs. The source code wasn't much help.

There isn't a good way to see progress via the programmatic API for the Firebase CLI right now. Your best bet would be to instead use spawn or similar to run it as a process and simply capture the stdout.
We'd like to improve this in the future but there are no concrete plans of what it will look like yet.

To see the complete list of keys off of the client object, see commands/index.js
In terms of what options to pass in, that is definitely hard to figure out. This seems like a great chance to submit an issue requesting specific improvements to documentation, or take a shot at documenting it yourself and submit a PR.

Related

Datadog cannot find check in "catalog" when implementing integration

I've been trying to implement a Datadog integration, more specifically Airflow's. I've been following this piece of documentation using the containerized approach (I've tried using pod annotations and adding the confd parameters to the agent's Helm values). I've only made advances when adding the airflow.yaml config to the confd sectrion of the cluster agent. However, I get stuck when I try to validate the integration as specified in the documentation by running datadog-cluster-agent status. Under the "Running Checks" section, I can see the following:
airflow
-------
Core Check Loader:
Check airflow not found in Catalog
On top of being extremely generic, this error message mentions a "Catalog" that is not referenced anywhere else in the DD documentation. It doesn't tell me or give me any hints on what could possibly wrong with the integration. Anyone had the same problem and knows how to solve it or at least how can I get more info/details/verbosity to debug this issue?
You may need to add cluster_check: true to your airflow.yaml confd configuration.

Topic Creating within Firebase Console

I was wondering how I can create a topic in the console of fire base. I see there is android code to do it from the application but that takes time to reflect on the console. I don't even know where to look if it was created. Also can this be done in Javascript compared to java?
Example code for JS would be nice if I cannot do it through the console.
Thanks,
You don't need to do anything in the console to create a topic. Just start using it by string name on both the server and client, and it will just work.

salt-cloud: use map.sls from GitFS

Is there a way of invoking salt-cloud with a map file from GitFS?
i.e. can I run something like this: sudo salt-cloud -m salt://map.sls?
Edit: Seems like this currently is not possible. As per #Utah_Dave's suggestion I created an issue in github.
That's not supported right now.
Salt Cloud requires the map file exist on the same box Salt Cloud is running from.
I think that's an interesting use case, though. I can see how that would be handy to keep the map files in git. I think it should be doable to add that feature in. Please feel free to open an issue requesting that feature here: https://github.com/saltstack/salt/issues/new
Thanks!

Printing messages on the OSGi console

I'm implementing a very light weight (embedded) OSGi framework which runs on a target piece of hardware. To attach a console I'm using org.apache.felix.gogo.shell and org.apache.felix.shell.remote.
To date, I've logged all custom messages using System.out.println which has worked fine, but now that I'm using the remote console I require something that will allow me to 'print' my messages to the OSGi console (and hopefully appear both on the target's console as well as the telnet console provided by felix.shell.remote).
I'm guessing there must be a way to get a handle to an OutputStream (or similar) to do this; My question is how? It seems that most people redirect their stdout etc. to solve problems like this.
I'm using declarative services, so I was hoping to be able to setup a component which attaches a referenced service (not important, but would make it nice and neat).
Any help is greatly appreciated.
The best way is to use logging for custom messages using the OSGi Log Service. That way you can get recent logs from the LogReader service from inside your shell or webconsole. If you insist on using popular frameworks like log4j etc. then you can get a bridge with Pax logging.
Alternatively, redirecting the output to a file in a known location works. You can then make a command in gogo that views that file or provide a tail function that continuously displays the new parts of the file.

git build number c#

I'm trying to embed git describe-generated version info into AssemblyInfo.cs plus some label within ASP.NET website.
I already tried using git-vs-versionino but this assumes Git executable on PATH. However default install of msysgit on Windows does not set this up; it uses git bash. This caused problems.
Now I am looking for a way to utilize libgit2sharp library (for zero external dependencies) to use as build number generator. However this library has no describe command...
Thanks!
git-describe is a UI feature that nobody has implemented in the library or bindings yet (or at least nobody's contributed it), but you can do it yourself fairly easily.
You get a list of the tags and what commits they point to, do a walk down the commits and count how many steps it took to get to a commit that you have in the list you built. This already gives you the information you need. If the steps were zero, then your description would be the tag name only; otherwise you append the number of steps and the current commit's id to it.
There's a work in progress libgit2 pull request that proposes an implementation of git-describe functionalities.
See #1066 for more information.
It's not finished yet. Make sure to subscribe to it in order to be notified of its future progress.
Once it's done, it should be quite easy to bind it and make it available through LibGit2Sharp.

Resources