Hi,
If you mean how to log data inside a template, you can use {{log data_here}} and this should show in the browser console.
You can also use the API: api.getCurrentUser().
For example, in the HTML <head> of your theme/component:
<script type="text/discourse-plugin" version="0.8">
console.log(api.getCurrentUser());
</script>